home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / dviware / beebe / doc / 00revhst.txt < prev    next >
Text File  |  1990-10-02  |  99KB  |  2,169 lines

  1. <BEEBE.TEX.DVI>00REVHST.TXT.200, 17-Nov-87 20:02:40, Edit by BEEBE
  2.  
  3. This file contains a reverse chronological log of changes made to
  4. the TeX DVI Driver family.
  5.  
  6. Version history:
  7.         2.10 [01-Nov-87]
  8.         2.09 [23-Sep-87]
  9.         2.08 [15-Aug-87]
  10.         2.07 [15-Apr-87]
  11.         2.06 [1986-1987]
  12.  
  13. The version number does not change with minor modifications  that
  14. affect only a few drivers, so the file write dates on the  master
  15. directories at  Utah  (and  recorded on  distribution  tapes  and
  16. floppies) must  be consulted  to determine  whether a  particular
  17. distribution contains  these corrections.   Where feasible,  this
  18. change  log  contains  sufficient   information  to  allow   hand
  19. installation of bug fixes.  Changes will generally not be  logged
  20. at new versions, since they may be extensive.
  21.  
  22. [07-Jun-88]     {Thanks to Hans Irtel
  23.                 <irtel%vax1.rz.uni-regensburg.dbp.de@RELAY.CS.NET>}
  24.                 In initglob.h about line 51, change
  25.  
  26.     size_limit = 255;                   /* largest character size */
  27.  
  28.                 to
  29.  
  30.     size_limit = 128;                   /* largest character size */
  31.  
  32.                 The HP LaserJet Plus has a character cell  height
  33.                 and width range limitation of 1..255, but further
  34.                 restricts  individual  character  dimensions   to
  35.                 0..128.  This bug  is exposed if  you attempt  to
  36.                 print characters  at size  magstep 4  or  larger,
  37.                 such as the following  test TeX file supplied  by
  38.                 William E. Anderson <anderson@cme-durer.arpa>:
  39.  
  40.                 \magnification=\magstep4
  41.                 $$f(x)=\int{g(x)\over x}\,dx$$
  42.                 \vfill\eject\bye
  43.  
  44.                 for which the integral sign will be lost  without
  45.                 the fix, and will appear once the fix is applied.
  46.  
  47. [31-May-88]
  48.                 Issued newsletter #17.
  49.  
  50. [30-May-88]     {Thanks to Jerry Leichter (LEICHTER@Venus.YCC.Yale.Edu)
  51.                 for providing an example that exposed this bug.}
  52.                 In dvijep.c, rules are  output one dot too  high.
  53.                 According to the  HP documentation, the  position
  54.                 of a rule is the upper-left corner.  I took  this
  55.                 to mean that  the rule would  be output  starting
  56.                 just under  the pixel  at (x,y)  in that  corner.
  57.                 What they must mean is that (x,y) is the position
  58.                 of the  pixel in  the  upper-left corner  of  the
  59.                 filled area.   Change the  definitions of  RULE()
  60.                 and RULE2() about line  160 to reduce the  height
  61.                 value by 1 in the arguments to MOVETO():
  62.  
  63. diff -c dvijep.c,75 dvijep.c
  64. *** dvijep.c,75 Wed May 18 09:42:01 1988
  65. --- dvijep.c    Mon May 30 19:03:07 1988
  66. ***************
  67. *** 162,174 ****
  68.   lower-left corner, while the LaserJet  Plus uses the upper-left  corner.
  69.   */
  70.   #define RULE(x,y,width,height) {\
  71. !       MOVETO(x,(y)+height);PUTESC;\
  72.         sprintf(plotfs,"*c%da%dbP",width,height); OUTST(plotfs);\
  73.   }
  74.   /* Set rule of  same size as  previous one at  TeX position (x,y).   The
  75.   device coordinates will be changed on completion. */
  76.   #define RULE2(x,y) {\
  77. !       MOVETO(x,(y)+rule_height);\
  78.         PUTESC;OUTST("*cP");\
  79.   }
  80.   /* Set the current font and character in preparation for a  DOWNLOADCHAR */
  81. --- 162,174 ----
  82.   lower-left corner, while the LaserJet  Plus uses the upper-left  corner.
  83.   */
  84.   #define RULE(x,y,width,height) {\
  85. !       MOVETO(x,(y)+height-1);PUTESC;\
  86.         sprintf(plotfs,"*c%da%dbP",width,height); OUTST(plotfs);\
  87.   }
  88.   /* Set rule of  same size as  previous one at  TeX position (x,y).   The
  89.   device coordinates will be changed on completion. */
  90.   #define RULE2(x,y) {\
  91. !       MOVETO(x,(y)+rule_height-1);\
  92.         PUTESC;OUTST("*cP");\
  93.   }
  94.   /* Set the current font and character in preparation for a  DOWNLOADCHAR */
  95.  
  96.                 The same correction must be made to dvilzr.c  for
  97.                 the DataProducts laser printer.
  98.  
  99.                 I had previously  received reports of  suspicions
  100.                 of an error  in dvijep's rule  positions, but  no
  101.                 one ever was  able to  supply an  example that  I
  102.                 could  reproduce   locally.   Here   is   Jerry's
  103.                 excellent little test file:
  104.  
  105. \documentstyle[12pt]{article}
  106. \def\vec(#1,#2){\put(0,0){\vector(#1,#2){50}}}
  107. \begin{document}
  108.  
  109. \setlength{\unitlength}{.01in}
  110. \begin{picture}(0,0)(100,100)
  111. \vec(-1,0)
  112. \vec(1,0)
  113. \vec(0,1)
  114. \vec(0,-1)
  115. %
  116. \vec(-4,1)\vec(-3,1)\vec(-2,1)\vec(-1,1)
  117. \vec(4,1)\vec(3,1)\vec(2,1)\vec(1,1)
  118. %
  119. \vec(-3,2)\vec(-1,2)
  120. \vec(3,2)\vec(1,2)
  121. %
  122. \vec(-4,3)\vec(-2,3)\vec(-1,3)
  123. \vec(4,3)\vec(2,3)\vec(1,3)
  124. %
  125. \vec(-3,4)\vec(-1,4)
  126. \vec(3,4)\vec(1,4)
  127. %
  128. \vec(-4,-1)\vec(-3,-1)\vec(-2,-1)\vec(-1,-1)
  129. \vec(4,-1)\vec(3,-1)\vec(2,-1)\vec(1,-1)
  130. %
  131. \vec(-3,-2)\vec(-1,-2)
  132. \vec(3,-2)\vec(1,-2)
  133. %
  134. \vec(-4,-3)\vec(-2,-3)\vec(-1,-3)
  135. \vec(4,-3)\vec(2,-3)\vec(1,-3)
  136. %
  137. \vec(-3,-4)\vec(-1,-4)
  138. \vec(3,-4)\vec(1,-4)
  139. %
  140. \end{picture}
  141. \end{document}
  142.  
  143.                 When printed  with  dvialw,  the  two  horizontal
  144.                 rules are  printed  correctly; before  the  above
  145.                 correction to  dvijep, they  were one  pixel  too
  146.                 high, (this gives a  visible white streak).   The
  147.                 correction should also fix the misalignment  with
  148.                 the arrowheads.
  149.  
  150. [30-May-88]
  151.                 The  following  bug  in  dvialw.c  was  fixed  on
  152.                 3-Feb-88, but unfortunately  didn't make it  into
  153.                 this log.
  154.  
  155. diff -c dvialw.c,78 dvialw.c,79
  156. *** dvialw.c,78 Sun Nov  1 11:21:38 1987
  157. --- dvialw.c,79 Wed Feb  3 16:38:28 1988
  158. ***************
  159. *** 1080,1085 ****
  160. --- 1080,1086 ----
  161.                 }
  162.                 OUT_CHR('(');
  163.                 OUT_XCHR(c);
  164. +               OUT_CHR(')');
  165.                 if (ycp != str_ycp)
  166.                 {
  167.                     OUT_NUM(xcp);
  168.  
  169.                 There was a missing ')' in the output.
  170.  
  171. [26-May-88]
  172.                 Issued newsletter #16.
  173.  
  174. [18-May-88]
  175.                 In dvijep.c about line 180, change
  176.         {PUTESC; sprintf(plotfs,"*c%dE",MAP_CHAR(ch)); OUTST(plotfs); }\
  177.                 to
  178.         {PUTESC; sprintf(plotfs,"*cd%dE",MAP_CHAR(ch)); OUTST(plotfs); }\
  179.                 This correction sets  the font number  to 0;  the
  180.                 old one works on the HP LaserJet, but might break
  181.                 on clones.
  182.  
  183. [14-Apr-88]
  184.                 Changed system() in vaxvms.c to allow warning and
  185.                 information  status  returns  to  be  treated  as
  186.                 success.  The body of system() now reads:
  187.  
  188.         t.dsc$w_length = strlen(s);
  189.         t.dsc$a_pointer = s;
  190.         t.dsc$b_class = DSC$K_CLASS_S;
  191.         t.dsc$b_dtype = DSC$K_DTYPE_T;
  192.  
  193.         /* The 3 low-order bits of stat are
  194.                 0 (warning),
  195.                 1 (success),
  196.                 2 (error),
  197.                 3 (information), or
  198.                 4 (severe or fatal error)
  199.            Consider values of 0, 1, or 3 to be success.  LIB$SPAWN
  200.            will usually return SS$_NORMAL, independent of the value
  201.            of stat.
  202.         */
  203.  
  204.         if (LIB$SPAWN(&t,0,0,0,0,0,&stat) != SS$_NORMAL)
  205.             return (127);
  206.         switch (stat & 7)
  207.         {
  208.         case 0:
  209.         case 1:
  210.         case 3:
  211.             return (0);
  212.         default:
  213.             return (127);
  214.         }
  215.  
  216.  
  217. [07-Mar-88]
  218.                 Changed type of main()  in keytst.c and  lptops.c
  219.                 from void to int,  and inserted return(0) at  end
  220.                 to keep lint and VAX VMS C compiler happy.  Draft
  221.                 ANSI C (Oct-86 and Jan-88) does not specify  what
  222.                 the type of main() should be, and most  compilers
  223.                 don't  care.   VMS  C  2.3  however  produces  an
  224.                 annoying warning message if main() is not of type
  225.                 int; I view this  behavior as erroneous,  because
  226.                 main() is  only  a convention  in  C, and  it  is
  227.                 possible   to   write   C   programs   in    many
  228.                 implementations that do not have a main().
  229.  
  230. [02-Mar-88]
  231.                 Added code to findpost.h to ignore trailing  NULs
  232.                 in a .DVI file, borrowing code from readpxl.h and
  233.                 readgf.h that do the  same thing for font  files.
  234.                 Users (including  me) have  been annoyed  by  the
  235.                 inability of the  drivers to handle  a .DVI  file
  236.                 which has passed through  a VAX VMS system  where
  237.                 gratuitous NULs  are  appended to  pad  the  file
  238.                 length to a multiple of 512 bytes.
  239.  
  240.                 This effort  revealed another  problem under  VAX
  241.                 VMS, and  that is  that the  code in  FSEEK()  in
  242.                 vaxvms.c on a request to position at  end-of-file
  243.                 actually positions  before  the  last  character,
  244.                 instead of after  it.  An  attempt at  correcting
  245.                 this was foiled by the VMS library ftell()  which
  246.                 returns 0  when the  position set  by FSEEK()  is
  247.                 outside the actual file limits, and while FTELL()
  248.                 can correct the  brain-damaged value returned  by
  249.                 ftell(), it  cannot distinguish  a nonsensical  0
  250.                 result from ftell()  at end-of-file  from one  at
  251.                 the beginning of the file.  Consequently, it  has
  252.                 been  necessary   in  findpost.h   to  bump   the
  253.                 postambleptr value by one.
  254.  
  255.                 Since  this   modification   can   be   installed
  256.                 independently in  even old  versions of  the  DVI
  257.                 driver family, and  a context difference  listing
  258.                 is larger than findpost.h,  here is the  complete
  259.                 new version:
  260.  
  261. /* -*-C-*- findpost.h */
  262. /*-->findpost*/
  263. /**********************************************************************/
  264. /****************************** findpost ******************************/
  265. /**********************************************************************/
  266.  
  267. void
  268. findpost()
  269.  
  270. {
  271.     register long       postambleptr;
  272.     register BYTE       i;
  273.     register UNSIGN16 the_char;         /* loop index */
  274.  
  275.     (void) FSEEK (dvifp, 0L, 2);        /* goto end of file */
  276.  
  277.     /* VAX VMS binary files are stored with NUL padding to the next
  278.     512 byte multiple.  We therefore search backwards to the last
  279.     non-NULL byte to find the real end-of-file, then move back from
  280.     that.  Even if we are not on a VAX VMS system, the DVI file might
  281.     have passed through one on its way to the current host, so we
  282.     ignore trailing NULs on all machines. */
  283.  
  284.     while (FSEEK(dvifp,-1L,1) == 0)
  285.     {
  286.         the_char = (UNSIGN16)fgetc(dvifp);
  287.         if (the_char)
  288.           break;                /* exit leaving pointer PAST last non-NUL */
  289.         UNGETC((char)the_char,dvifp);
  290.     }
  291.  
  292.     postambleptr = FTELL(dvifp) - 4;
  293.  
  294. #if    OS_VAXVMS
  295.     /* There is a problem with FSEEK() that I cannot fix just now.  A
  296.     request to position to end-of-file cannot be made to work correctly,
  297.     so FSEEK() positions in front of the last byte, instead of past it.
  298.     We therefore modify postambleptr accordingly to account for this. */
  299.  
  300.     postambleptr++;
  301. #endif
  302.  
  303.     (void) FSEEK (dvifp, postambleptr, 0);
  304.     while (TRUE)
  305.     {
  306.         (void) FSEEK (dvifp, --(postambleptr), 0);
  307.         if (((i = (BYTE)nosignex(dvifp,(BYTE)1)) != 223) &&
  308.             (i != DVIFORMAT))
  309.             (void)fatal("findpost():  Bad end of DVI file");
  310.         if (i == DVIFORMAT)
  311.             break;
  312.     }
  313.     (void) FSEEK (dvifp, postambleptr - 4, 0);
  314.     (void) FSEEK (dvifp, (long)nosignex(dvifp,(BYTE)4), 0);
  315. }
  316.  
  317. [06-Feb-88]
  318.                 Revised lpt.ps to handle formfeed and tabs.
  319.  
  320. [17-Nov-87]     Installation  of  the  DVI  driver  family  under
  321.                 Microsoft C Version 5.0  resulted in a number  of
  322.                 changes more fully described in 01README.TXT  (to
  323.                 be included in the next DVI newsletter).  This is
  324.                 the first compiler that  fully conforms to  draft
  325.                 ANSI C (October  1986) in both  the language  and
  326.                 the run-time library.
  327.  
  328.                 Added missing typecast in dvieps.c and dvie72.c.
  329.  
  330.                 In  dvihead.h,  added  #include's  for  io.h  and
  331.                 time.h for IBM_PC_MICROSOFT.
  332.  
  333.                 Added two  missing  typecasts  in  dvijep.c,  and
  334.                 inserted the missing condition "(t->istoobig) ||"
  335.                 to BIGCHAR().
  336.  
  337.                 In gblprocs.h, replaced ANSI flag by ANSI_LIBRARY
  338.                 and  ANSI_PROTOTYPES   to   distinguish   between
  339.                 library conformance, and ANSI function  prototype
  340.                 use,  and  adjusted  many  function  declarations
  341.                 accordingly.
  342.  
  343.                 In  keybrd.c,   provided   alternate   name   for
  344.                 interrupt(); its use otherwise causes an compiler
  345.                 error with MSC 5.0.
  346.  
  347.                 In   keydef.h,   replaced    ANSI   section    by
  348.                 ANSI_LIBRARY and ANSI_PROTOTYPE sections.
  349.  
  350.                 In keytst.c, added some comments, and changed the
  351.                 test to  loop a  maximum of  five times  with  no
  352.                 input.  Introduced an  implementation of  sleep()
  353.                 for OS_PCDOS.
  354.  
  355.                 In   lptops.c,   replaced    ANSI   section    by
  356.                 ANSI_LIBRARY  and  ANSI_PROTOTYPE  sections,  and
  357.                 reset a couple of constants to type long.
  358.  
  359.                 In   machdefs.h,   replaced   ANSI   section   by
  360.                 ANSI_LIBRARY and ANSI_PROTOTYPE sections, and for
  361.                 IBM_PC_MICROSOFT, defined float  to be double  to
  362.                 reduce data conversion warnings.
  363.  
  364.                 In main.h,  removed  #include's of  stdlib.h  and
  365.                 string.h; they are already in machdefs.h.
  366.  
  367.                 In  option.h,  removed   use  of   ABS()  for   a
  368.                 floating-point argument to remove data conversion
  369.                 warning.
  370.  
  371.                 In texidx.c, changed  preprocessor symbol MSC  to
  372.                 IBM_PC_MICROSOFT.
  373.  
  374.                 In   tosprx.c,   replaced    ANSI   section    by
  375.                 ANSI_LIBRARY and ANSI_PROTOTYPE sections.
  376.  
  377.                 Revised IBM PC-specific version  of Make to  work
  378.                 with Microsoft  C Version  5.0, eliminating  some
  379.                 severe  limitations  imposed  by  Wizard  C,  and
  380.                 permitting  the  MAKEFILE.MSC  to  be  completely
  381.                 self-contained, instead  of having  to  reference
  382.                 MAKEFILE.1 .. MAKEFILE.4.   Several new  features
  383.                 were also implemented in Make; they are described
  384.                 in a 00README.TXT file in the PCMAKE directory.
  385.  
  386. [01-Nov-87]     Replaced references to (void)fprintf(..., plotfp)
  387.                 with  references   to   new   macros   OUTF(...),
  388.                 OUTF2(...),  and  OUTF3(...),  or  existing  ones
  389.                 OUTC() and  OUTS().   Replaced all  instances  of
  390.                 putc(*c++,plotfp)   by   "OUTC(*c);c++".    Since
  391.                 putc() is usually a  macro, there is a  potential
  392.                 incorrect side effect  if its  first argument  is
  393.                 evaluated more than once.  Most C implementations
  394.                 use it only in the two branches of a  conditional
  395.                 expression, which is safe.
  396.  
  397. [01-Nov-87]     Completed major overhaul  of dvijep.c.  The  font
  398.                 deletion mechanism  was  not  successful,  partly
  399.                 because the  font  number  was  not  subsequently
  400.                 reset in one place, but mostly because it  causes
  401.                 a page eject.  This  would make it impossible  to
  402.                 print some documents.  dvijep now keeps track  of
  403.                 both the number  of fonts in  use on the  current
  404.                 page,  and  the  total  number  in  use  in   the
  405.                 document.   When  either   of  these  limits   is
  406.                 reached, the characters in  those fonts are  sent
  407.                 as bitmaps, instead of  as downloaded fonts.   It
  408.                 is still possible to have a document which is too
  409.                 complex for the LaserJet to print (raising  error
  410.                 code  21  on  the  printer  front  panel   status
  411.                 display), but that is now a limit imposed by  the
  412.                 printer, rather than the  DVI driver, and  cannot
  413.                 be gotten around.
  414.  
  415.                 There is  room for  further work  here,  however.
  416.                 Most documents  do  not  require  an  excessively
  417.                 large   number    of   fonts.     For    example,
  418.                 dvidriver.ltx uses 23  fonts, and weave.tex  uses
  419.                 15, but the TeXbook uses 54.
  420.  
  421.                 When the DVI driver begins execution, through the
  422.                 call chain main() ->  dvifile() -> readpost()  ->
  423.                 getfntdf()  ->   readfont()  ->   reldfont()   ->
  424.                 read{pk|gf|pxl}() -> newfont(), it normally reads
  425.                 in  the  font  definitions  from  the  DVI   file
  426.                 postamble and assigns  font numbers  in order  of
  427.                 occurrence, and  builds  its  internal  font  and
  428.                 character tables.  Later, as pages are processed,
  429.                 font  changes  occasioned  by  DVI  fnt_num_0  ..
  430.                 fnt_num_63 and fnt1  .. fnt4  commands result  in
  431.                 setting the global  flag font_switched, which  in
  432.                 turn causes setchar() and setstr() to output font
  433.                 switch commands to the device.
  434.  
  435.                 The implication of  this for dvijep  is that  all
  436.                 fonts  beyond  the   first  32   are  marked   as
  437.                 non-downloadable.  In the case of the TeXbook, it
  438.                 turns out  that  this includes  the  heavily-used
  439.                 cmr, cmsy, and cmmi fonts at  5, 6, 7, 8, 9,  and
  440.                 10 pt sizes, which means  that almost all of  the
  441.                 characters set on a page will be sent as bitmaps,
  442.                 instead of as  downloaded characters.   On my  HP
  443.                 LaserJet Plus,  every page  raised printer  error
  444.                 code 21.  This might not happen on an HP LaserJet
  445.                 Series II,  which  can  have  substantially  more
  446.                 memory, but  I haven't  one  locally to  try  the
  447.                 experiment.
  448.  
  449.                 The solution  to this problem  is to  delay  font
  450.                 number assignment  until  the  font  is  actually
  451.                 referenced.  Since a considerably smaller  number
  452.                 of fonts  are needed  on each  page, it  is  then
  453.                 possible  to  download  most   of  them,  and   a
  454.                 font-rich  document  like  the  TeXbook  can   be
  455.                 printed successfully  in  sections.   The  change
  456.                 involves moving the  body of newfont()  to a  new
  457.                 function, makefont(), and  having newfont()  only
  458.                 initialize  the   font_number  with   a   special
  459.                 "undefined" value.   The  macro  SET_CURRENT_FONT
  460.                 has  become   big  enough   that  it   has   been
  461.                 transformed   into    a   function,    setfont().
  462.                 setfont()  now   checks   font_number   for   the
  463.                 undefined  value,  and  in  such  a  case,  calls
  464.                 makefont() to assign the font a number and create
  465.                 it in the printer.  With this change, the TeXbook
  466.                 can be printed successfully.
  467.  
  468. [30-Oct-87]     Changed  vaxvms.c,  gblprocs.h,  openfont.h,  and
  469.                 machdefs.h to  support dynamic  determination  of
  470.                 the limit on  the number  of open  files for  VAX
  471.                 VMS.  This is a VMS quota parameter whose dynamic
  472.                 value depends  on  the  number  of  subprocesses.
  473.                 Previously, a user with  too small a limit  would
  474.                 find the dvi drivers could fail because the  hard
  475.                 limit on the  number of open  font files was  too
  476.                 large.
  477.  
  478. [29-Oct-87]     In LW78.C,  removed typeout  of  final CR  LF  in
  479.                 Get_Msg(), and  inserted system  call to  dismiss
  480.                 the process until the  output buffer is empty  at
  481.                 the start of Put_Packet().
  482.  
  483.                 LW78 had been experiencing I/O error returns from
  484.                 the Apple LaserWriter Plus, and when I  attempted
  485.                 to  copy  a  PostScript  file  directly  to   the
  486.                 printer,  the  same  thing  happened,  only  much
  487.                 earlier in the job.  This raised the suspicion of
  488.                 buffer overrun in the printer.  Three experiments
  489.                 using a  100-page document  with (1)  a  5-second
  490.                 sleep before outputting each buffer, (2)  process
  491.                 dismissal until the buffer was empty, and (3) the
  492.                 Kermit TRANSMIT command (which waits for a prompt
  493.                 from  the  LaserWriter   after  each  line)   all
  494.                 resulted  in  successful  printing,  and  I  have
  495.                 confidence that this change in LW78 will  provide
  496.                 superior performance.
  497.  
  498.                 With the new LW78, I sent dvidriver.dvi-alw  with
  499.                 the modified BOP and EOP definitions given below,
  500.                 and printed the 100 pages at an average rate of 5
  501.                 pages  per  minute.   Virtual  memory  usage  was
  502.                 initially 2Kb to  4Kb per page  while fonts  were
  503.                 being downloaded, and in later pages, dropped  to
  504.                 a low of  1105 bytes/page.  Pages  with that  low
  505.                 figure had only  text set on  them, and no  fonts
  506.                 downloaded, with the text guarded by save/restore
  507.                 sequences.   That   virtual  memory   was   still
  508.                 consumed leads one  to wonder if  there is not  a
  509.                 bug in  the  PostScript  memory  allocation  code
  510.                 which causes  some  "seepage" loss.   If  one  of
  511.                 dvialw's macros were leaving unclaimable  garbage
  512.                 behind, one would expect that the garbage  amount
  513.                 would vary, but many different pages had the same
  514.                 1105  bytes/page   consumption.   Total   virtual
  515.                 memory consumed by the  job was 112Kb, with  78Kb
  516.                 remaining available at end-of-job.
  517.  
  518. [27-Oct-87]     Simplified beginning-of-page and end-of-page code
  519.                 in prtpage.h  by creating  bopact() and  eopact()
  520.                 routines in several drivers, and removed bopact.h
  521.                 and eopact.h (which were previously used only  by
  522.                 dvibit),  including   references   to   them   in
  523.                 makefile.*.
  524.  
  525. [27-Oct-87]     Numerous  small   editorial  changes   for   code
  526.                 consistency, and to reduce the number of warnings
  527.                 from the lint utility.
  528.  
  529. [27-Oct-87]     {Thanks to John Pavel (mcvax!nplpsg!jrp@uunet.uu.net)
  530.                 for urging this change}
  531.                 On Unix only, Version  2.10 now permits input  to
  532.                 come from  stdin, and  output  to go  to  stdout,
  533.                 allowing use  of the  drivers as  filters.   This
  534.                 choice is automatically made  when no file  names
  535.                 are specified on the command line.
  536.  
  537.                 Use of  stdout  for  binary  files  is  generally
  538.                 impossible for  other  operating  systems,  which
  539.                 either make a distinction between text and binary
  540.                 file formats, or use line terminators other  than
  541.                 <LF>,   necessitating    translation   of    Unix
  542.                 end-of-line '\n' on input  and output.  With  the
  543.                 exception of  dvialw,  all  the  drivers  produce
  544.                 binary output files.
  545.  
  546. [27-Oct-87]     {Thanks to Bernhard Nebel (NEBEL@DB0TUI11.BITNET)
  547.                 for useful suggestions}
  548.                 Completed  major   overhaul   of   dvialw.c.    A
  549.                 fundamental  problem  with  existing   PostScript
  550.                 interpreters   is   that   they   lack    garbage
  551.                 collection,  and  the  PostScript  programmer  is
  552.                 expected  to  manage  storage  with  save/restore
  553.                 command  judiciously  wrapped  around  throw-away
  554.                 code.   The  problem   this  poses   for  a   TeX
  555.                 environment is that one does not wish to  discard
  556.                 downloaded  fonts,  since  they  will  likely  be
  557.                 needed again.
  558.  
  559.                 In the previous version of dvialw, the -s and  -v
  560.                 options provided some user  control of this,  but
  561.                 such user control is only of marginal utility.
  562.  
  563.                 It proved  interesting to  install the  following
  564.                 PostScript code  segment immediately  before  the
  565.                 BOJ (beginning of job) command in an output  file
  566.                 from dvialw  produced  from  Appendix  F  of  the
  567.                 TeXBook.   The   TeXbook  uses   54  fonts,   and
  568.                 therefore puts  a sizeable  burden on  a  printer
  569.                 that has only limited font memory.
  570.  
  571. % These provide alternate definitions of BOP and EOP in dvialw.ps
  572. % which cause CPU time and virtual memory statistics to be printed
  573. % at the bottom of each output page
  574. /BOP
  575. {
  576. clear
  577. Mtrx setmatrix
  578. 25 0 translate
  579. vmstatus pop /VMUSED exch def pop
  580. usertime
  581. } bdf
  582. /EOP
  583. {
  584. /#copies exch def
  585. /USERTIMEIN exch def
  586. save
  587. /pt {Resolution 72 div mul} def
  588. /Helvetica-BoldOblique findfont 12 pt scalefont setfont
  589. /SP {12 pt 0 pt rmoveto} def
  590. /PN {SP 10 vmstr cvrs show} def
  591. /vmstr 15 string def
  592. 36 pt 36 pt moveto
  593. ([VMstatus:) show
  594. vmstatus PN PN PN (]) show
  595. SP SP ([VMpage:) show
  596. vmstatus pop exch pop VMUSED sub PN
  597. (]) show
  598. SP SP ([Page time:) show
  599. usertime USERTIMEIN sub PN ( msec]) show
  600. restore
  601. showpage
  602. } bdf
  603.  
  604.                 With this addition, each  page now  carries  both
  605.                 memory usage and (printer) CPU time statistics at
  606.                 the  bottom   of  each   page.   On   the   Apple
  607.                 LaserWriter with  paper  type  "note",  there  is
  608.                 about 250Kb of  virtual memory  available at  job
  609.                 start.   Here   is   a  table   of   the   memory
  610.                 requirements for successive  pages of Appendix  F
  611.                 of the TeXbook:
  612.  
  613.                           ----  -----------  -----------
  614.                           Page  DVIALW 2.09  DVIALW 2.10
  615.                           ----  -----------  -----------
  616.                            431                   4953
  617.                            432                  26057
  618.                            433                   3713
  619.                            434                   9693
  620.                            435     27948        21101
  621.                            436     18971        13421
  622.                            437     15644        10109
  623.                            438     21764        15324
  624.                            439     27064        19596
  625.                            440      8172         6628
  626.                           ----  -----------  -----------
  627.  
  628.                 Version  2.09  reached   a  VM  error   condition
  629.                 (virtual memory  exhausted)  on page  434,  while
  630.                 Version 2.10 was able  to proceed 4 pages  beyond
  631.                 that before hitting the same limit.  Each page in
  632.                 Version 2.10  requires  about  30%  less  virtual
  633.                 memory.
  634.  
  635.                 Initially, I wrote  a short  filter program  that
  636.                 moved the text strings on each page to after  the
  637.                 font download sequences, wrapping  the text in  a
  638.                 save/restore pair to  recover the virtual  memory
  639.                 needed to store  them.  This proved  to be  quite
  640.                 straightforward, requiring only about 60 lines of
  641.                 C code.
  642.  
  643.                 To implement the same  facility in dvialw  proved
  644.                 much more complex, because  I was not willing  to
  645.                 suffer the  performance penalty  of reading  each
  646.                 page of  the  DVI  file twice,  once  to  collect
  647.                 needed fonts, and a second  time to set text  and
  648.                 rules.  Instead,  a completely  new mechanism  is
  649.                 implemented whereby output is channelled  through
  650.                 several new routines, which ultimately reach  the
  651.                 low-level textchr() routine  which gets a  single
  652.                 character to process.   Based on  a global  flag,
  653.                 textchr() either outputs  this immediately  (e.g.
  654.                 for macros,  rules,  and  font  downloading),  or
  655.                 stores it in an  internal buffer (text  setting).
  656.                 On the basis of examination of .dvi-alw files for
  657.                 the DVI  driver  manual,  and  the  TeXbook,  the
  658.                 internal buffer is chosen  to be large enough  so
  659.                 that it will usually only need to be dumped  once
  660.                 per page.
  661.  
  662.                 PostScript loop  tests on  the Apple  LaserWriter
  663.                 Plus (Version  38.0  PostScript)  give  execution
  664.                 times of about 0.25 msec for one iteration of  an
  665.                 empty loop, determined by executing
  666.  
  667.                 usertime 10000 {} repeat usertime exch sub
  668.  
  669.                 and 55 msec for one save/restore pair:
  670.  
  671.                 usertime 1000 {save restore} repeat usertime exch sub
  672.  
  673.                 Consequently,  one  does   NOT  want   to  do   a
  674.                 save/restore around every string, but only around
  675.                 large groups of strings.
  676.  
  677.                 Because of  the use  of relative  coordinates  in
  678.                 most output typeset text (the T macro instead  of
  679.                 the S  macro), and  the  use of  remembered  rule
  680.                 widths (w and h in the B and Q macros), it is not
  681.                 trivial to correctly handle the case of more than
  682.                 one  bufferful   per  page   (since   intervening
  683.                 non-buffered output  might  change  the  font  or
  684.                 current point), and it took a considerable number
  685.                 of iterations to  get it working  satisfactorily,
  686.                 with the buffer size temporarily set artificially
  687.                 low.
  688.  
  689.                 Having  the  output  being  filtered  through   a
  690.                 central location, textchr(), has made it possible
  691.                 to further economize on the output volume (e.g by
  692.                 collapsing    <letter><newline><open-paren>    to
  693.                 <letter><open-paren>,   and   to   more   closely
  694.                 approach  a  constant  line  width  (except   for
  695.                 PostScript from  a \special{}  command, which  is
  696.                 output verbatim).   Some operating  systems  have
  697.                 trouble with  long lines  in files,  and  Version
  698.                 2.10 should now largely remove this problem.
  699.  
  700.                 The  line  breaking   algorithm  implemented   in
  701.                 textchr() and  textflush() is  far from  trivial,
  702.                 because PostScript does  not uniformly  recognize
  703.                 <backslash><newline> as  a continuation  sequence
  704.                 that can be discarded;  instead, it permits  this
  705.                 continuation  mechanism  only  in   parenthesized
  706.                 strings.    Otherwise,    comments   cannot    be
  707.                 continued,   angle-bracketed   strings   can   be
  708.                 continued by simply inserting a bare newline, and
  709.                 elsewhere, a  newline can  be  used any  place  a
  710.                 blank  is  used.   Some  of  the  comment   lines
  711.                 produced by dvialw are  long; they are now  split
  712.                 automatically by  placing a  hyphen in  the  last
  713.                 column of the line,  and continuing with "%-"  on
  714.                 the next line.  Any software that takes advantage
  715.                 of the %%PageTable at the end will therefore need
  716.                 adjusting (I  doubt  that  any  exists,  so  this
  717.                 change does not concern  me).  It is  regrettable
  718.                 that the PostScript developers did not give  line
  719.                 continuation more thought.
  720.  
  721.                 Font  change  commands   are  now  defined   more
  722.                 compactly as  "F#" or  "F##",  where "#"  is  the
  723.                 sequential number of  the font  in the  document.
  724.                 This further helps to reduce output volume.   The
  725.                 initial font definitions (the NF macro) still use
  726.                 the full name, and carry a comment with the  font
  727.                 file name, so it is still possible to easily find
  728.                 out what font file was  used for any part of  the
  729.                 output.  The problem of corrupted font files  has
  730.                 come to my attention on several occasions, so  it
  731.                 is worthwhile  to  maintain  this  connection  in
  732.                 dvialw, which is  the only  driver that  produces
  733.                 human-readable printer output.
  734.  
  735.                 On Appendix  F  of  the  TeXbook,  these  changes
  736.                 reduced the output file size by about 8% compared
  737.                 to Version 2.09, and about 9% when  PS_SHORTLINES
  738.                 was non-zero.   On  the  DVI  driver  manual  (99
  739.                 pages), the  file  size from  Version  2.10  with
  740.                 PS_SHORTLINES defined was  15% shorter than  that
  741.                 from   Version    2.09.    Since    a    non-zero
  742.                 PS_SHORTLINES produces marginally smaller output,
  743.                 it is now  the default  for all  implementations,
  744.                 but  it  can  be  overridden  by  a  compile-time
  745.                 redefinition.
  746.  
  747. [22-Oct-87]     {Thanks to Marcus Moehrmann (marcus%fkihh@unido.uucp)}
  748.                 Added drivers dvieps and  dvie72 for Epson  9-pin
  749.                 printers and compatibles.  dvieps  is for 240H  x
  750.                 216V  resolution,  and  dvie72  for  60H  x   72V
  751.                 resolution  (same   as  dviprx   for   Printronix
  752.                 printers).
  753.  
  754.                 It was necessary to make  a number of changes  to
  755.                 the submitted code  to bring  it up-to-date  with
  756.                 the rest  of the  family, and  to conform  to  my
  757.                 coding practices.  Since I  do not have an  Epson
  758.                 printer  on  which  to  test  this  locally,  the
  759.                 version     number     carries     the     suffix
  760.                 "[experimental]".  The  same  suffix  appears  in
  761.                 dvica2.  These will be  removed when the  drivers
  762.                 are considered ready for final release, based  on
  763.                 positive user feedback.
  764.  
  765. [22-Oct-87]     Added  debug option 128 (DBG_SET_TEXT) to display
  766.                 each piece of  text set by  the driver,  together
  767.                 with its page coordinates  in dots, and its  font
  768.                 name.  This of course produces voluminous output,
  769.                 but is quite handy when you are trying to step  a
  770.                 long way into execution to track down a bug.
  771.  
  772. [22-Oct-87]     All debug options have been turned into symbolic
  773.                 references, e.g.
  774.  
  775.                 if (DBGOPT(DBG_OFF_PAGE))
  776.  
  777.                 instead of
  778.  
  779.                 if (debug_code & 32)
  780.  
  781.                 It was clearly a mistake not to have done this in
  782.                 the first place.   I also  wish that  I had  made
  783.                 these  options  sequential  numbers,  instead  of
  784.                 powers of two,  but it  is probably  too late  to
  785.                 change that now.
  786.  
  787. [12-Oct-87]     Edited dviman.texinfo to bring it up-to-date with
  788.                 dvi.1l and dviman.ltx.
  789.  
  790. [01-Oct-87]     Created Unix-style man page file, dvi.1l.
  791.  
  792. [01-Oct-87]     Added  support  for  a  "-z"  option  (typein  of
  793.                 "DVISPOOL dvifilename") for 4.xBSD Unix  systems,
  794.                 which  have  imitated  TOPS-20's  STI%  (Simulate
  795.                 Terminal Input) JSYS facility with  ioctl(fildes,
  796.                 TIOCSTI, *char).
  797.  
  798. [30-Sep-87]     {Thanks to Stefan Kronberg (ZEFFI@FINABO.BITNET)}
  799.                 Added support  of  font  files  with  up  to  256
  800.                 characters.  Normal TeX Computer Modern fonts use
  801.                 only 128 characters per font, but extensions  for
  802.                 European  alphabets,  and  Japanese  fonts,  will
  803.                 require more than  128.
  804.  
  805.                 Unfortunately, this was not quite as trivial as I
  806.                 had  originally   intended,  where   the   values
  807.                 LASTPXLCHAR and NPXLCHARS in gendefs.h need  only
  808.                 be increased  from 127  and 128  to 255  and  256
  809.                 respectively.  The problem is that several  loops
  810.                 used code like
  811.  
  812.                 BYTE k;
  813.                 ...
  814.                 for (k = FIRSTPXLCHAR; k <= LASTPXLCHAR; ++k)
  815.  
  816.                 With LASTPXLCHAR = 255,  the last loop  iteration
  817.                 will increment k to 256,  but since it is a  byte
  818.                 value, this  wraps to  0,  and the  loop  becomes
  819.                 infinite on a  byte-oriented machine.  This  made
  820.                 it necessary to retype the offending loop indices
  821.                 as UNSIGN16.
  822.  
  823.                 The context  diff listing  for these  changes  is
  824.                 rather long  (about  1200  lines), so  I  do  not
  825.                 include it here.
  826.  
  827. [30-Sep-87]     Changed -d option processing in option.h to allow
  828.                 multiple -d  options  to accumulate,  instead  of
  829.                 requiring them to be set with one -d option.  The
  830.                 change is simple: replace
  831.  
  832.                 debug_code = (BYTE)atoi(optstr+2);
  833.  
  834.                 by
  835.  
  836.                 debug_code |= (BYTE)atoi(optstr+2);
  837.  
  838.  
  839. [29-Sep-87]     Because  of  problems  on  record-oriented   file
  840.                 systems (VAX VMS being  the worst offender),  the
  841.                 code in dvialw.c does more when PS_SHORTLINES  is
  842.                 defined; it now keeps track of output widths, and
  843.                 will not produce output lines more than a  couple
  844.                 of  characters   longer  than   a  fixed   value,
  845.                 PS_MAXWIDTH.  However, no such limit is placed on
  846.                 comments, or  macros  retrieved  from  dvialw.ps;
  847.                 both of these are already of limited length.
  848.  
  849.                 Changed machdefs.h to  allow PS_SHORTLINES to  be
  850.                 set at compile time.
  851.  
  852.                 A single experiment on a 20-page DVI file  showed
  853.                 that the .dvi-alw output was about 3% longer when
  854.                 a version of  dvialw with  PS_SHORTLINES set  was
  855.                 used.
  856.  
  857. [29-Sep-87]     {Thanks to John Pavel (mcvax!nplpsg!jrp@seismo.css.gov)
  858.                 and Brendan McKay (munnari!anucsd.oz!dbm@seismo.css.gov)}
  859.  
  860.                 The code in dvialw.c  in functions setchar()  and
  861.                 setstr() emits a save/restore pair around a large
  862.                 character  font   definition.    On   the   Apple
  863.                 LaserWriter Plus (which I only recently got as  a
  864.                 replacement for our stolen ALW), this results  in
  865.                 a "Fatal system  error @ 0X2e6bec".   The fix  is
  866.                 fortunately simple.  Change  those two  instances
  867.                 of
  868.  
  869.                 OUTS("save");
  870.  
  871.                 (but NOT the  one in special()) to
  872.  
  873.                 OUTS("save /temporary_font NF 1 /temporary_font SF");
  874.  
  875.                 This will put the  character in a temporary  font
  876.                 which is discarded  when the  restore command  is
  877.                 executed.  Here is simple test file using cminch;
  878.                 it produces a large (~400Kb) .dvi-alw file.
  879.  
  880. % test for dvialw downloading of large characters
  881. \font\bigfont=cminch
  882. This file tests a DVI driver's capability to support downloading
  883. of large characters.  The following uninteresting tables of the
  884. Roman alphabet are printed in font {\it cminch\/}.
  885. \bigfont
  886. \obeylines
  887. ABC
  888. DEF
  889. GHI
  890. JKL
  891. MNO
  892. PQR
  893. STU
  894. VWX
  895. YZ
  896. \vfill\eject\end
  897.  
  898.  
  899. [29-Sep-87]     {Thanks to John Pavel (mcvax!nplpsg!jrp@seismo.css.gov)}
  900.                 Removed  obsolete   SHORTLINES  references   from
  901.                 machdefs.h; PS_SHORTLINES remains, and can now be
  902.                 set in machdefs.h, instead  of only in  dvialw.c.
  903.                 The default setting in machdefs.h now is
  904.  
  905.                 #define PS_SHORTLINES 0
  906.  
  907.                 and dvialw.c now has
  908.  
  909.                 #ifndef PS_SHORTLINES
  910.                 #define PS_SHORTLINES   0  /* run with long output lines */
  911.                 #endif
  912.  
  913. [28-Sep-87]     Updated all makefiles to include a generic target
  914.                 dvi$(PGM) and  an  extra compilation  flag  value
  915.                 XCFLAGS, so test versions can be constructed by a
  916.                 command like "make PGM=foo XCFLAGS=-g dvifoo".
  917.  
  918. [28-Sep-87]     {Thanks to Ian Young (ian@latlog.uucp)}
  919.                 At the  end  of  readgf.h,  newfont()  is  called
  920.                 before the loop which retrieves character metrics
  921.                 via chargf().  This  is incorrect for  HPJETPLUS,
  922.                 where the newfont() code in dvijep.c uses some of
  923.                 the metrics.   For the  other devices,  newfont()
  924.                 only sets values  in the  font character  tables.
  925.                 Therefore, move the newfont()  call to AFTER  the
  926.                 loop, so that the code reads in readgf.H:
  927.  
  928.     for (the_char = FIRSTPXLCHAR; the_char <= LASTPXLCHAR; the_char++)
  929.     {   /* Get remaining character metrics, and ignore error returns for now. */
  930.         tcharptr = &(fontptr->ch[the_char]);
  931.         if (tcharptr->fontrp >= 0L)
  932.             (void)chargf(the_char,(void(*)())NULL);
  933.     }
  934.  
  935. #if    (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2)
  936.     (void)newfont();
  937. #endif
  938.  
  939. [28-Sep-87]     On Unix systems,  getlogin() returns  (char*)NULL
  940.                 if the process is not attached to a terminal,  in
  941.                 particular, if  the  process  is  attached  to  a
  942.                 pseudo-terminal (pty),  such as  a window  or  an
  943.                 editor shell  buffer.  The  way to  get the  real
  944.                 login name  in  these  circumstances  is  to  use
  945.                 cuserid((char*)NULL) in place of getlogin(),  and
  946.                 I have according made that change in dvialw.c and
  947.                 lptops.c,   and   added   appropriate    function
  948.                 declarations in gblprocs.h.
  949.  
  950.                 This  change  affects  only  text  output  in   a
  951.                 PostScript   comment.     Both   cuserid()    and
  952.                 getlogin() are defined in 4.2BSD Unix, AT&T SYS V
  953.                 Unix, HPUX,  KCC  (version  4),  and  IEEE  Posix
  954.                 (which draft ANSI  C follows).  PCC  and V7  Unix
  955.                 had  only  getlogin().   VAX   VMS  C  has   only
  956.                 cuserid().  KCC (version 3), Microsoft C, Lattice
  957.                 C, and Wizard C have neither.
  958.  
  959. [23-Sep-87]     {Version 2.09 announcement}
  960.                 Testing  of  the  Free  Software  Foundation  gcc
  961.                 compiler has  uncovered two  bugs so  far in  the
  962.                 compiler (they  are  being fixed  rapidly).   gcc
  963.                 produces  code   for   both  VAX   and   Motorola
  964.                 architectures, and is being  used to develop  the
  965.                 GNU operating system.  The  testing also found  a
  966.                 serious  bug  in  my  code  which   unfortunately
  967.                 impacts most of the DVI  drivers, and can be  the
  968.                 cause of core dumps or other failures.
  969.  
  970.                 The  value  of  XSIZE  in  dvi*.c  is   currently
  971.                 computed as XDPI*XPSIZE,  that is, the number  of
  972.                 dots across the page.  Unfortunately, one or more
  973.                 local arrays are  later allocated  and used  with
  974.                 the assumption that  XSIZE is a  multiple of  the
  975.                 machine word size, HOST_WORD_SIZE, and in dvijet,
  976.                 it   was   assumed   to   be   a   multiple    of
  977.                 2*HOST_WORD_SIZE.
  978.  
  979.                 This bug was never caught on the DEC-20,  because
  980.                 there  stacks  grow   upward,  so   beyond-bounds
  981.                 references to stack  arrays may  just be  writing
  982.                 into unused memory.  However,  on the VAX,  Intel
  983.                 iAPX, and  Motorola  architectures,  stacks  grow
  984.                 downward, and such  references can  wipe out  the
  985.                 call history,  precipitating at  best an  address
  986.                 exception or illegal  instruction violation  when
  987.                 the return instruction  is executed.  This  would
  988.                 only  happen  if   text  was   set  against   the
  989.                 right-hand  side  of  the  page,  and  since  TeX
  990.                 documents usually produce wide margins, this  may
  991.                 be unlikely to happen.
  992.  
  993.                 To  avoid  complex  dimension  computations,  and
  994.                 preserve  uniformity  of  definition  among   the
  995.                 family, XSIZE is now  increased to a multiple  of
  996.                 2*HOST_WORD_SIZE  throughout.   The  fix  is   to
  997.                 change
  998.  
  999. #define  XSIZE          (XDPI*XPSIZE)   /* number of horizontal dots */
  1000.  
  1001.                 to
  1002.  
  1003. #define  XSIZE          (((XDPI*XPSIZE+2*HOST_WORD_SIZE-1)/\
  1004.                                 (2*HOST_WORD_SIZE))*(2*HOST_WORD_SIZE))
  1005.                                         /* number of horizontal dots; */
  1006.                                         /* MUST BE multiple of */
  1007.                                         /* 2*HOST_WORD_SIZE */
  1008.  
  1009.                 in all the dvi*.c files.  I view this bug fix  to
  1010.                 be important enough to  warrant a version  number
  1011.                 change, so  the family  is now  at version  2.09.
  1012.  
  1013.                 The following  Unix script  can be  used on  Unix
  1014.                 systems to automate the patch:
  1015.  
  1016. #!/bin/csh
  1017. foreach f (dvi*.c)
  1018.         echo $f
  1019.         mv $f $f-old
  1020.         sed -f bugfix.sed <$f-old >$f
  1021. end
  1022.  
  1023.                 Here is bugfix.sed:
  1024. s|"2.08|"2.09|
  1025. s|(XDPI\*XPSIZE)[       ]*/\* number of horizontal dots \*/|(((XDPI*XPSIZE+2*HOST_WORD_SIZE-1)/\\\
  1026.                                 (2*HOST_WORD_SIZE))*(2*HOST_WORD_SIZE))\
  1027.                                         /* number of horizontal dots; */\
  1028.                                         /* MUST BE multiple of */\
  1029.                                         /* 2*HOST_WORD_SIZE */|
  1030.  
  1031. [23-Sep-87]     In openfont.h,  nopen  is  incremented  when  the
  1032.                 requested font  is  not  found  in  the  list  of
  1033.                 currently open  files, but  the code  forgets  to
  1034.                 decrement it  if  the  request  font  never  gets
  1035.                 successfully opened, which can happen if the font
  1036.                 file cannot be found, and no substitution font is
  1037.                 provided.  Change  the  code about  line  185  to
  1038.                 decrement nopen on open  failure, so that it  now
  1039.                 reads:
  1040.  
  1041.                 if (fontfp == (FILE*)NULL)
  1042.                 {
  1043.                     --nopen;            /* don't count this failed open */
  1044.                     (void)sprintf(message,"Font file [%s [mag %d]] could not be \
  1045.  
  1046.  
  1047. [18-Sep-87]     In  LW78.C,   Wait_For_Printer_Ready(),   removed
  1048.                 output of Ctl-D; with the Apple LaserWriter Plus,
  1049.                 this  causes  the  printer  to  respond  to   the
  1050.                 following Ctl-T with  "printer busy", instead  of
  1051.                 "idle", like the old Apple LaserWriter did.
  1052.  
  1053. [18-Sep-87]     {Thanks to Mic Kaczmarczik (CC.KCACMARCZIK@A20.CC.UTEXAS.EDU)}
  1054.                 When dvialw.ps  is modified  to select  LANDSCAPE
  1055.                 mode instead of  NOTE (portrait),  the output  is
  1056.                 positioned  incorrectly,  and  character  bitmaps
  1057.                 look somewhat  ragged.   The former is  due to  a
  1058.                 missing translation  command, and  the latter  to
  1059.                 tiny  non-zero  transformation  matrix   elements
  1060.                 which introduce computed coordinates which are in
  1061.                 error by  one  pixel.   I  have  also  taken  the
  1062.                 liberty of  installing a  fix for  the fact  that
  1063.                 NOTE  is  not  defined  on  non-Apple  PostScript
  1064.                 printers.  It should  no longer  be necessary  to
  1065.                 edit dvialw.ps for Texas Instruments, QMS, et  al
  1066.                 PostScript printers.
  1067.  
  1068.                 There is one problem  with this change, and  that
  1069.                 is that the SNAP call in the CharBuilder  routine
  1070.                 must now be  executed for each  character set  on
  1071.                 the page, so the output may prove to be  somewhat
  1072.                 slower.  To check this, I downloaded dvialw.ps to
  1073.                 our new Apple LaserWriter Plus, then executed
  1074.  
  1075.                 TeXdict begin
  1076.                 usertime 10000 {0 0 SNAP pop pop} repeat usertime
  1077.                 exch sub pstack
  1078.  
  1079.                 which results in a time  of 70844 msec for  10000
  1080.                 calls,  or  an  extra  overhead  of  7  msec  per
  1081.                 character.  Repeating  the  experiment  using  an
  1082.                 empty procedure body gives  a loop overhead  time
  1083.                 of 0.2 msec.  With an average of 3000  characters
  1084.                 set per page,  this amounts to  21 sec per  page,
  1085.                 which is  definitely  not  negligible.   You  may
  1086.                 therefore wish to  leave the SNAP  call out of  a
  1087.                 version  of  dvialw.ps  that  is  used  only  for
  1088.                 portrait orientation output.
  1089.  
  1090.                 Similar timing  loops can  be used  to reveal  an
  1091.                 average  execution  time  of   1  msec  for   any
  1092.                 arithmetic    operation    (+-/*);     PostScript
  1093.                 interpreters badly  need hardware  floating-point
  1094.                 support!  There  is  a repeatable  difference  of
  1095.                 about 10%  increase in  speed when  operands  are
  1096.                 floating-point instead of integer values.  dvialw
  1097.                 could be changed  to write floating-point  values
  1098.                 instead of  integer  ones,  with  a  tradeoff  of
  1099.                 slightly  increased  output   file  size  to   be
  1100.                 balanced against slightly faster arithmetic.
  1101.  
  1102.                 At the same  time, I  increased XPSIZE  to 14  in
  1103.                 dvialw.c so  that landscape  mode output  is  not
  1104.                 clipped.  Future work should introduce a  general
  1105.                 flexible solution to  the problem  of paper  size
  1106.                 specification for all of the drivers.
  1107.  
  1108.                 Here is a  context difference  which records  the
  1109.                 changes.  Additions are flagged with a "+" in the
  1110.                 first column, and  changes with a  "!", with  the
  1111.                 old code first, and the new second.
  1112.  
  1113. *** dvialw.ps-old       Wed Jul 29 14:35:41 1987
  1114. --- dvialw.ps   Fri Sep 18 17:48:10 1987
  1115. ***************
  1116. *** 1,3 ****
  1117. --- 1,10 ----
  1118. + % <BEEBE.TEX.DVI>DVIALW.PS.17, 18-Sep-87 17:48:04, Edit by BEEBE
  1119. + % Add test for note paper and if unknown, use letter paper instead.
  1120. + % Non-Apple PostScript implementations do not know about note paper
  1121. + % but its use on the Apple LaserWriter gains 92K of virtual memory
  1122. + % <BEEBE.TEX.DVI>DVIALW.PS.16, 18-Sep-87 15:50:52, Edit by BEEBE
  1123. + % Modify coordinate computations to remove round-off errors
  1124. + % in landscape mode, and correct landscape page origin
  1125.   % <BEEBE.TEX.DVI>DVIALW.PS.14, 22-Jun-87 09:55:05, Edit by BEEBE
  1126.   % Add missing "0 900 translate Mtrx currentmatrix pop" to /LEGAL
  1127.   % <BEEBE.TEX.DVI>DVIALW.PS.13,  7-Jan-87 17:38:51, Edit by BEEBE
  1128. ***************
  1129. *** 110,116 ****
  1130.   /BOJ
  1131.   {
  1132.     72 Resolution div 72 Resolution div scale
  1133. !   NOTE                                % default page format
  1134.   } bdf
  1135.  
  1136.   % BOP -- beginning of page
  1137. --- 117,126 ----
  1138.   /BOJ
  1139.   {
  1140.     72 Resolution div 72 Resolution div scale
  1141. !   userdict /note known
  1142. !   {NOTE}                              % default page format for ALW
  1143. !   {LETTER}                            % default page format for others
  1144. !   ifelse
  1145.   } bdf
  1146.  
  1147.   % BOP -- beginning of page
  1148. ***************
  1149. *** 146,151 ****
  1150. --- 156,162 ----
  1151.       ch-xoff neg                       ch-yoff ch-height sub
  1152.       ch-width ch-xoff sub      ch-yoff
  1153.       setcachedevice
  1154. +     0 0 SNAP translate
  1155.       ch-width ch-height true [ 1 0 0 -1 ch-xoff ch-yoff ]
  1156.       {ch-image} imagemask
  1157.     } if
  1158. ***************
  1159. *** 185,190 ****
  1160. --- 196,202 ----
  1161.     72 Resolution div dup scale
  1162.     0 3300 translate
  1163.     -90 rotate
  1164. +   0 -750 translate
  1165.     Mtrx currentmatrix pop
  1166.   } bdf
  1167.  
  1168. ***************
  1169. *** 271,276 ****
  1170. --- 283,292 ----
  1171.   % SF -- set new font at scale nnn (nnn = 1 normally; 2 gives double size chars)
  1172.   % Usage -- nnn /fontname SF
  1173.   /SF {findfont exch scalefont setfont} bdf() pop
  1174. +
  1175. + % SNAP -- convert coordinates to integer device coordinates and back again
  1176. + % Usage -- xxx yyy SNAP (leave xxx' yyy' on stack)
  1177. + /SNAP {transform 2 {floor 0.5 add exch} repeat itransform} bdf
  1178.  
  1179.   % T -- move absolute horizontally and show string, updating horizontal position
  1180.   % to new endpt
  1181.  
  1182.  
  1183. [08-Sep-87]
  1184.                 In lptops.c, change
  1185.                 OUTSTR(getlogin());
  1186.                 to
  1187.                 if (getlogin() != (char*)NULL)
  1188.                     OUTSTR(getlogin());
  1189.                 because getlogin()  can sometimes  return a  null
  1190.                 pointer, instead of a null string.
  1191.  
  1192. [31-Aug-87]     {Thanks to HUXTABLE@UKANVAX.BITNET}
  1193.                 In gblprocs.h in the  ANSI type declarations  for
  1194.                 dvifile and  main, change  "char *[0]"  to  "char
  1195.                 *[]".   The  "[0]"  is   an  odd  production   of
  1196.                 Microsoft C which  was used to  prepare the  type
  1197.                 declarations at compile time.  It sneaked through
  1198.                 the editing (it is not needed for Microsoft C  to
  1199.                 compile these).  VAX  VMS C  version 2.3-024  now
  1200.                 supports ANSI function declaration prototypes;  I
  1201.                 don't have it up yet.
  1202.  
  1203. [14-Aug-87]     Released Version 2.08 in time for TUG meeting.
  1204.  
  1205. [14-Aug-87]     {Thanks to Matthias Moritz (U608017@NHYKUN11.EARN)
  1206.                 for Atari support additions}
  1207.                 Merged in support for the Atari 520ST+ using  the
  1208.                 Mark Williams  C Compiler.   makefile.ast  should
  1209.                 build it.  Since  this involves  changes in  many
  1210.                 routines, I took the  opportunity to introduce  a
  1211.                 few other changes  as well,  and incremented  the
  1212.                 version number of dvi*.c from 2.07 to 2.08.   The
  1213.                 new versions should be functionally identical  to
  1214.                 the previous ones for virtually everyone.
  1215.  
  1216.                 The Mark Williams compiler has some  limitations,
  1217.                 and could not handle  long macro definitions,  in
  1218.                 particular  DEBUG_OPEN  and  FONTLIST.   I   have
  1219.                 therefore made DEBUG_OPEN() expand to  dbgopen(),
  1220.                 where  the  latter  is  defined  at  the  end  of
  1221.                 dviinit.h;  this  does  not  follow  my  standard
  1222.                 practice of one function per file.  FONTLIST  was
  1223.                 simply removed, and the two instances of its  use
  1224.                 were replaced by its definition.  There are about
  1225.                 40 instances in the driver source code of  macros
  1226.                 continued over multiple lines.  They are  written
  1227.                 that way to prevent long lines in the source code
  1228.                 (80 is the absolute limit), which is an even more
  1229.                 serious barrier to portability.
  1230.  
  1231.                 The default stacksize on  the Atari is often  too
  1232.                 small; for  the time  being, main  programs  have
  1233.                 been set to  declare a larger  stack.  On PC  DOS
  1234.                 (which Atari  GEMDOS  resembles),  the  Microsoft
  1235.                 EXEMOD  utility  can  be   used  to  change   the
  1236.                 stacksize  of  an   executable  program   without
  1237.                 requiring  code  modification.    I  don't   know
  1238.                 whether there is something similar on the Atari.
  1239.  
  1240.                 I removed the OS_xxxx-dependent conditional  code
  1241.                 in dvi*.c for output file extension selection, by
  1242.                 introduction of  a  new variable,  DVIPREFIX,  in
  1243.                 machdefs.h.  This  is  prepended to  the  default
  1244.                 file extension, which is now always identical  to
  1245.                 the letters following  dvi in  the dvi*.c  files.
  1246.                 On  systems  which  do  not  support  long   file
  1247.                 extensions, it will be a null string;  otherwise,
  1248.                 it will be "dvi-".
  1249.  
  1250.                 In dvialw.c, a  genuine BUG surfaced;  PSDEF_PATH
  1251.                 should be  #define'd  to be  subpath  instead  of
  1252.                 SUBPATH.  Otherwise, it  cannot be overridden  by
  1253.                 an  environment  variable.   Thanks  to  Matthias
  1254.                 Moritz for catching this one.
  1255.  
  1256.                 An experimental version of a Canon A2 driver  has
  1257.                 been added as  dvica2.c, based on  work by  Pekka
  1258.                 Pietilainen (TFYS-PP@FINOU.BITNET), starting from
  1259.                 dvican.c.  I  have  merged  in  his  changes  and
  1260.                 removed Unix-isms.  This driver is  intentionally
  1261.                 not included in the Makefiles.  Only a few  sites
  1262.                 have  the  Canon  A2   printer,  and  once   more
  1263.                 experience is obtained, it may replace  dvican.c.
  1264.                 If you have such a printer, you can easily modify
  1265.                 the appropriate Makefile  to support  it, or  you
  1266.                 can just compile and  load dvica2 manually.   For
  1267.                 debugging  purposes,   three  additional   option
  1268.                 switches are  accepted  in  option.h;  they  will
  1269.                 disappear as the code settles.
  1270.  
  1271.                 More experience with the drivers at many VAX  VMS
  1272.                 sites has indicated  that variable-length  record
  1273.                 files for  the  output are  probably  undesirable
  1274.                 until DEC gets its act in gear and makes all  VMS
  1275.                 utilities handle  such  files properly.   I  have
  1276.                 therefore modified the code  in dviinit.h to  use
  1277.                 the  fixed-block  binary   format  for  all   but
  1278.                 POSTSCRIPT devices (for which the output is truly
  1279.                 an ordinary text  file); previously, this  format
  1280.                 was only selected for IMPRESS (dviimp).
  1281.  
  1282.                 For non-Unix operating  systems, it is  generally
  1283.                 necessary to open  binary files differently  than
  1284.                 text files,  since  the C-runtime  libraries  use
  1285.                 that distinction to decide how to translate  Unix
  1286.                 line terminators.  Every system  so far has  used
  1287.                 the letter  "b" in  the  fopen() mode  string  to
  1288.                 select this mode, and  every Unix system  ignores
  1289.                 the "b", except Ultrix,  which raises a  run-time
  1290.                 error, sigh...   I  have therefore  replaced  the
  1291.                 mode string by RB_OPEN and WB_OPEN, and they  are
  1292.                 set in  machdefs.h.  For  all Unix  systems  they
  1293.                 will be  "r"  and  "w",  and  for  most  non-Unix
  1294.                 systems, "rb" and "wb".
  1295.  
  1296.                 Lines longer than  80 characters in  *.c and  *.h
  1297.                 files have been wrapped.
  1298.  
  1299.                 The header "%!PS-Adobe-1.0" in dvialw.c has  been
  1300.                 shortened to "%!";  the Adobe TranScript  spooler
  1301.                 software thinks it is allowed to do page reversal
  1302.                 when it sees this, but dvialw output pages cannot
  1303.                 be reordered because  fonts are  defined only  on
  1304.                 demand.  The similar  header in  lptops.c is  all
  1305.                 right; the pages there ARE independent.
  1306.  
  1307.                 The sources have been run through 4.2BSD lint and
  1308.                 System V  lint.  A  number of  missing  typecasts
  1309.                 have  been  supplied,  and  several  unreferenced
  1310.                 local variables have been eliminated.  lint still
  1311.                 produces many  warnings, but  the remaining  ones
  1312.                 seem to be benign, or simply red herrings.
  1313.  
  1314.                 lint revealed  numerous  problems  with  texidx.c
  1315.                 (which  came  from  the  GNU  Project).   I  have
  1316.                 eliminated unused  variables and  functions,  but
  1317.                 there remain  some  serious errors  of  incorrect
  1318.                 argument    lists    to    sort_in_core()     and
  1319.                 sort_offline().  I am not proposing to fix  these
  1320.                 now, because  at least  3 comprehensive  indexing
  1321.                 packages for  TeX  have  appeared  recently,  and
  1322.                 texidx.c may rapidly become obsolete.
  1323.  
  1324.                 I have changed the handling of some  preprocessor
  1325.                 symbols in several  routines  so as to  eliminate
  1326.                 redefinition warnings, and  any assumptions  that
  1327.                 undefined symbols evaluate to 0.  The draft  ANSI
  1328.                 C standard  REQUIRES that  all undefined  symbols
  1329.                 evaluate to  0 in  preprocessor expressions,  but
  1330.                 many compilers to  do yet follow  this rule  (VAX
  1331.                 VMS C in particular).
  1332.  
  1333. [15-Aug-87]     {Thanks to Julian Perry (seismo!mcvax!zen.co.uk!jules)}
  1334.                 The code  in option.h  in the  -o switch  section
  1335.                 that forced page_begin[npage] <=  page_end[npage]
  1336.                 conflicts with negative page numbers for counting
  1337.                 from the end.  I have removed the code there, and
  1338.                 then in  dvifile.h, before  the main  page  loop,
  1339.                 inserted  code  to  reset  the  page_begin[]  and
  1340.                 page_end[] arrays  to positive  values (this  can
  1341.                 only be done after  page_count is known), and  to
  1342.                 order them properly.
  1343.  
  1344.  
  1345. [10-Aug-87]     {Thanks to Gary Beihl (beihl%bell.cad.mcc.com@mcc.com)}
  1346.                 In  lw78.c  and  dvialw.c,  change  instances  of
  1347.                 time(0) to time((long*)NULL).
  1348.  
  1349.  
  1350. [27-Jul-87]     {Thanks to Charles Karney (Karney%ppc.mfenet@nmfecc.arpa)}
  1351.                 Here are two small changes to vaxvms.c:
  1352.  
  1353.                 In vmsexit(), we turn on a high bit on a non-zero
  1354.                 status code to suppress a useless VMS message:
  1355.                 150,151c150,151
  1356.                 <       exit((1 << 28) + 2);            /* error */
  1357.                 <       break;                          /* (suppresses %NONAME-E-NOMSG) */
  1358.                 ---
  1359.                 >       exit(2);                        /* error */
  1360.                 >       break;
  1361.                 457d456
  1362.  
  1363.                 In system(),  add  a  test for  the  status  code
  1364.                 returned by LIB$SPAWN; for the MAKE utility, this
  1365.                 allows recognition  of  errors  returned  from  a
  1366.                 compilation.
  1367.  
  1368.                 <       int stat;
  1369.                 463,464c462
  1370.                 <       return ((LIB$SPAWN(&t,0,0,0,0,0,&stat) == SS$_NORMAL)
  1371.                 <           && ((stat & 1) > 0)) ? 0 : 127;
  1372.                 ---
  1373.                 >       return (LIB$SPAWN(&t) == SS$_NORMAL) ? 0 : 127;
  1374.  
  1375.  
  1376. [20-Jul-87]
  1377.                 Updated cross-referencing awk scripts for use  on
  1378.                 Sun OS 3.3 using standard cxref utility, replaced
  1379.                 old x*.awk  by  xref, xref1.awk,  xref2.awk,  and
  1380.                 xref3.awk, and  replaced dvi.lrf  and dvi.rby  by
  1381.                 dvi.xrf.
  1382.  
  1383.  
  1384. [20-Jul-87]     {Thanks to Eric M. Carroll (Eric.M.Carroll@uunet.uu.net)}
  1385.                 In  dvialw.c,  getlogin()   can  return  a   NULL
  1386.                 pointer,  so  we  need  to  guard  against  that.
  1387.                 Change
  1388.  
  1389.                 (void)fprintf(plotfp,"%%%%Creator: %s and ",getlogin());
  1390.                 to
  1391.                 (void)fprintf(plotfp,"%%%%Creator: %s and ",
  1392.                     (getlogin() == (char*)NULL) ? "" : getlogin());
  1393.  
  1394.  
  1395. [08-Jul-87]
  1396.                 Update makefile.*  to  reflect  new  dvil3p,  and
  1397.                 remove obsolete makefile.eun (for Eunice).
  1398.  
  1399.  
  1400. [08-Jul-87]
  1401.                 Add symbol  DECLN03PLUS  and change  SUBPATH  for
  1402.                 Unix      from      /usr/lib/tex/inputs/       to
  1403.                 /usr/lib/tex/macros  to   match  Washington   TeX
  1404.                 distribution.
  1405.  
  1406.  
  1407. [08-Jul-87]
  1408.                 In gblprocs.h, add OS_VAXVMS to the list of hosts
  1409.                 where sprintf() is not declared (because it is in
  1410.                 system include files).
  1411.  
  1412.  
  1413. [08-Jul-87]
  1414.                 Change  type  of  main()  from  void  to  int  in
  1415.                 gblprocs.h  and   main.h  to   bring  them   into
  1416.                 conformance with the draft ANSI C Standard.
  1417.  
  1418.  
  1419. [08-Jul-87]
  1420.                 In fontfile.h, changed VMS  section to allow  for
  1421.                 the possibility that TEXFONTS  is a logical  name
  1422.                 list (thanks for John Sauter for this).
  1423.  
  1424.  
  1425. [08-Jul-87]     {Thanks to John Sauter (Sauter@dssdev.dec.com)}
  1426.                 Add dvil3p.c for DEC LN03+ printer.
  1427.  
  1428.  
  1429. [08-Jul-87]
  1430.                 In dvil75.c  in  prtbmap(), change  OUTC('-')  to
  1431.                 OUTS("-\n") so as to avoid long output lines.
  1432.  
  1433.  
  1434. [10-Jun-87]
  1435.                 Fix several spelling errors:
  1436.                 machdefs.h:     "you machine" -> "your machine"
  1437.                 dvi.hlp:        "cmr10.300pxl" -> "cmr10.1500pxl"
  1438.                                 "setenv VAR=value" -> "setenv VAR value"
  1439.                 dviman.ltx:     "cmr10.300pxl" -> "cmr10.1500pxl"
  1440.                                 "setenv VAR=value" -> "setenv VAR value"
  1441.                 dviman.texinfo: "cmr10.300pxl" -> "cmr10.1500pxl"
  1442.                                 "setenv VAR=value" -> "setenv VAR value"
  1443.  
  1444.  
  1445. [20-May-87]     from Brendan Mackay (munnari!anucsd.oz!bdm@seismo.CSS.GOV)
  1446.                 In openfont.h, the virtual font section can  erroneously
  1447.                 reference a null fontfp; change
  1448.                     if (virt_font)
  1449.                 to
  1450.                     if (virt_font && (fontfp != (FILE*)NULL))
  1451.  
  1452.                 and
  1453.                     if (virt_font && virt_save[fileno(fp)].base != (char *)NULL)
  1454.                 to
  1455.                     if (virt_font && (fp != (FILE*)NULL) &&
  1456.                         (virt_save[fileno(fp)].base != (char *)NULL))
  1457.  
  1458.  
  1459. [15-May-87]
  1460.                 On line 127  of execute.c  in the  IBM PC-specific  MAKE
  1461.                 utility, change
  1462.                 *str >= 'A' && *str <= 'A' ||
  1463.                 to
  1464.                 *str >= 'A' && *str <= 'Z' ||
  1465.  
  1466.  
  1467. [29-Apr-87]     from Brendan Mackay (munnari!anucsd.oz!bdm@seismo.CSS.GOV)
  1468.                 In machdefs.h, change
  1469.                 #define REWIND(fp)      fseek(fp,0L,0)
  1470.                 to
  1471.                 #define REWIND(fp)      FSEEK(fp,0L,0)
  1472.                 This is not necessary for the family as distributed, but
  1473.                 Brendan  has  implemented   the  virtual  font   changes
  1474.                 necessary for VAX VMS; they should be incorporated in  a
  1475.                 future release.
  1476.  
  1477.  
  1478. [29-Apr-87]     from Brendan Mackay (munnari!anucsd.oz!bdm@seismo.CSS.GOV)
  1479.                 The code for vms_read() [in vaxvms.c] has problems.  One
  1480.                 is that you don't  test for end of  file.  The other  is
  1481.                 that there is a bug in the C library which prevents  you
  1482.                 asking for  more than  65535  bytes at  a time.   It  is
  1483.                 documented  that  no  more  than  65535  bytes  will  be
  1484.                 returned, but not that you  can't ask for more.  If  you
  1485.                 do,  it  reduces  your  request  mod  65536!   Here's  a
  1486.                 replacement:
  1487.  
  1488. /**********************************************************************/
  1489. /*-->READ*/
  1490. int
  1491. READ(file_desc,buffer,nbytes)
  1492. register int file_desc;
  1493. register char *buffer;
  1494. register int nbytes;
  1495. {
  1496.     register int ngot;
  1497.     register int left;
  1498.  
  1499.     for (left = nbytes; left > 0; /* NOOP */)
  1500.     {
  1501.         ngot = read(file_desc,buffer,(left > 65024 ? 65024 : left));
  1502.         if (ngot < 0)
  1503.             return (-1);        /* error occurred */
  1504.         if (ngot == 0)          /* eof occurred */
  1505.             return(nbytes-left);
  1506.         buffer += ngot;
  1507.         left -= ngot;
  1508.     }
  1509.     return(nbytes-left);
  1510. }
  1511.  
  1512.  
  1513. [15-Apr-87]     Completed version 2.07 for general release.
  1514.  
  1515.  
  1516. [04-Apr-87] to
  1517. [15-Apr-87]
  1518.                 Changed texidx.c to check for special  characters
  1519.                 in generated  \initial{}  commands  and  suitably
  1520.                 protect them.
  1521.  
  1522.                 Changed dviinit.h to try to open output file  and
  1523.                 log file  in current  directory  if open  in  the
  1524.                 directory of  the  .dvi  file  fails  (presumably
  1525.                 because no write access to that directory).
  1526.  
  1527.                 Adapted  loadbmap()   code   from   dvican.c   to
  1528.                 dvijep.c,  and  added  function  declaration   in
  1529.                 gblprocs.h,  finally   removing  the   limitation
  1530.                 dvijep had for large font characters.
  1531.  
  1532.                 Rearranged some  struct members  in gblvars.h  to
  1533.                 ease debugging.
  1534.  
  1535.                 Added check in openfont.h for null pfontptr.
  1536.  
  1537.                 Updated Makefile's and added  ones for KCC,  PCC,
  1538.                 and VMS.
  1539.  
  1540.                 Rewrote 00arit.c  to test  short, int,  and  long
  1541.                 integer arithmetic.
  1542.  
  1543.                 Changed version numbers  in dvi*.c  from 2.06  to
  1544.                 2.07.
  1545.  
  1546.                 Split bopact.h (beginning of page action) out  of
  1547.                 eopact.h.
  1548.  
  1549.                 Rewrote eopact.h to reflect new instant  keyboard
  1550.                 response   and   better    control   over    page
  1551.                 positioning.
  1552.  
  1553.                 Increased value of BIGBGCHAR in dvibit.c to allow
  1554.                 large characters to be sent as fonts, rather than
  1555.                 bitmaps.
  1556.  
  1557.                 There seems to be a bug in BitGraph Version  3.10
  1558.                 which causes characters to be overwritten at  the
  1559.                 right margin  when  the actual  screen  width  is
  1560.                 used.  Reduced value of XSIZE in dvibit.c to  fix
  1561.                 the problem.
  1562.  
  1563.                 Decreased YSIZE  in dvibit.c  to make  space  for
  1564.                 larger command and status area at top of screen.
  1565.  
  1566.                 Added keybrd.c  and keydef.h  to handle  keyboard
  1567.                 input.  keybrd.c was a major effort (900 lines of
  1568.                 code and  comments),  but now  nicely  hides  the
  1569.                 ugliness of  instant keyboard  input on  all  the
  1570.                 operating systems presently supported in the  DVI
  1571.                 family.
  1572.  
  1573.                 Removed references to Berkeley Unix sgtty.h  file
  1574.                 and tty structures in dvibit.c and gblvars.h;  no
  1575.                 longer needed since keybrd.c hides those details.
  1576.  
  1577.                 Use JSok instead of  JSerr in f20open.h to  allow
  1578.                 jsys() calls to work for both KCC-20 and PCC-20.
  1579.  
  1580.                 Modified character  screen clipping  decision  in
  1581.                 setchar() in dvibit.c.
  1582.  
  1583.                 Changed raster-op  code from  3  to 9  in  BBNDPD
  1584.                 command in setchar() in dvibit.c so that  display
  1585.                 is correct  with both  inverse video  and  normal
  1586.                 video.
  1587.  
  1588.                 Split reldfont.h  out  of readfont.h  to  support
  1589.                 font unloading needed for dvibit zoom commands.
  1590.  
  1591.                 Added #include "reldfont.h" to dvi*.c.
  1592.  
  1593.                 Removed conditionals  around #include  statements
  1594.                 and put them in the #include'd file instead; this
  1595.                 reduces the  number  of  changes  needed  in  the
  1596.                 dvi*.c files  as  new implementations  are  made.
  1597.                 This affects f20open.h, strchr.h, and strrchr.h.
  1598.  
  1599.                 Added KCC support changes to dvihead.h,  fatal.h,
  1600.                 f20open.h,   gblprocs.h,   machdefs.h,    main.h,
  1601.                 strchr.h, strrchr.h, texid3.h.
  1602.  
  1603.                 Added terminal backslash  to lines in  multi-line
  1604.                 macro invocations in dvijep.c and getbmap.h  (KCC
  1605.                 restriction).
  1606.  
  1607.                 Added new function declarations to gblprocs.h.
  1608.  
  1609.                 Changed dimension of message[] in gblvars.h  from
  1610.                 MAXSTR to  MAXMSG; it  needs  to be  larger  than
  1611.                 MAXSTR in order to hold error messages containing
  1612.                 strings of  size MAXSTR.   MAXMSG is  defined  in
  1613.                 gendefs.h.
  1614.  
  1615.                 Updated lptops.c and lw78.c for KCC.
  1616.  
  1617.                 Added conditionals to lptops.c to initialize  all
  1618.                 unset symbols  to  0  (KCC  requires  this),  and
  1619.                 default to OS_UNIX if no host is defined.
  1620.  
  1621.                 Added KCC_20 and DECLA75 symbols to machdefs.h.
  1622.  
  1623.                 Changed major DVI  command loop  in prtpage.h  to
  1624.                 call kbinput(),  bopact(), and  eopact() for  BBN
  1625.                 BitGraph,  and  changed  full  screen  erase   to
  1626.                 partial erase to preserve command/status window.
  1627.  
  1628.                 In texid3.c, changed short name readln to  rdline
  1629.                 to remove conflict with KCC library.
  1630.  
  1631.                 Added GETCHAR routine  to vaxvms.c;  this is  not
  1632.                 needed by the DVI driver family, but the idea was
  1633.                 used in keybrd.c.
  1634.  
  1635.  
  1636. [01-Apr-87]     Begin work on Version 2.07
  1637.                 General work: major changes to support new KCC-20
  1638.                 compiler, substantially enhance  DVIBIT, and  add
  1639.                 DVIL75.
  1640.  
  1641. ========================================================================
  1642.  
  1643. [01-Apr-87]
  1644.                 End work on Version 2.06:
  1645.  
  1646.  
  1647. [04-Mar-87]
  1648.                 Added declaration of errno in dvihead.h for BSD41
  1649.                 and BSD42; they don't have it in errno.h.
  1650.  
  1651.  
  1652. [04-Mar-87]
  1653.                 Added test for null file pointer before calls  to
  1654.                 fclose() in abortrun.h and dviterm.h; failure  to
  1655.                 do so causes core dumps when exit() is entered in
  1656.                 4.1 and 4.2BSD Unix.
  1657.  
  1658.  
  1659. [27-Feb-87]
  1660.                 option.h did not support negative magnifications,
  1661.                 like -m-0.5 and -m-1, which was advertised in the
  1662.                 documentation, dviman.ltx.   Code  has  now  been
  1663.                 added to handle that  case.  Without the fix,  it
  1664.                 is  of   course  still   possible  to   get   any
  1665.                 magnification value, since e.g. if -m1500 is  the
  1666.                 default on  a 300  dpi  printer, then  -m-0.5  is
  1667.                 equivalent to -m1369 (1369 = 1500/(1.2**(-0.5))).
  1668.  
  1669.  
  1670. [26-Feb-87]
  1671.                 In dispchar.h, change the line
  1672.                       rightones[HOST_WORD_SIZE - 1 - bits_to_next] &
  1673.                 to
  1674.                       rightones[bits_to_next] &
  1675.  
  1676.                 This code is not active for non 32-bit  machines,
  1677.                 or the IBM PC, and the local 32-bit Unix machines
  1678.                 running the driver  family have  been using  only
  1679.                 the laser  printer members,  so the  bug was  not
  1680.                 caught until  we  actually  tried  DVIPRX  output
  1681.                 under VAX VMS.  The effect  it has is that  large
  1682.                 vertical  white  streaks  appear  in  the  output
  1683.                 bitmap;   dispchar()   is   used   by   all   the
  1684.                 low-resolution dot matrix printers.
  1685.  
  1686.  
  1687. [25-Feb-87]
  1688.                 Added code  to  prtbmap() in  dviprx.c  to  print
  1689.                 bitmap in hexadecimal  when (debug_code  & 1)  is
  1690.                 non-zero.
  1691.  
  1692.  
  1693. [21-Feb-87]
  1694.                 In    prtpage.h,    corrected    "\special"    to
  1695.                 "\\special"; this error was caught by the  KCC-20
  1696.                 compiler.
  1697.  
  1698.  
  1699. [10-Feb-87]
  1700.                 Yesterday I discovered that  VAX VMS 4.4 printf()
  1701.                 wipes out the stack and  kills  the  process if a
  1702.                 long string is printed.  This turns out to be the
  1703.                 case in outline() in dvitos.c; the code has  been
  1704.                 modified to use fputs() there instead.
  1705.  
  1706.  
  1707. [10-Feb-87]
  1708.                 Several debugging sessions  on VAX  VMS  stepping
  1709.                 through  the call chain fflush()  -> _flsbuf() ->
  1710.                 _flsbuf_record()      ->    write_record()     ->
  1711.                 write_buffer() -> write_imbed() -> write_output()
  1712.                 ->signal()  -> c$$translate() have  made it clear
  1713.                 that the simple scheme in dvi*.c  and lptops.c of
  1714.                 checking  for  a   non-zero   return value   from
  1715.                 fflush() or  ferror() is  an unreliable  way   to
  1716.                 conclude  a legitimate  error (specifically, disk
  1717.                 storage   exhausted) exists.  Consequently, these
  1718.                 routines have been modified to call clearerr() at
  1719.                 the beginning of  loadchar() and prtbmap(),  then
  1720.                 to  use a macro DISKFULL()  to test for the error
  1721.                 condition.   DISKFULL() is defined in machdefs.h,
  1722.                 and errno.h is  now included  by dvihead.h.  This
  1723.                 regrettably introduces  small changes in a number
  1724.                 of routines, but no other  clean way of doing the
  1725.                 job appeared to be feasible.
  1726.  
  1727.  
  1728. [02-Feb-87]
  1729.                 Changed "pagecollation on" to "pagecollation off"
  1730.                 in dviimp.c.   With  version 3.3  of  the  Imagen
  1731.                 Image Processor software, there seems to be a bug
  1732.                 in that "pagecollation on" causes page  reversal.
  1733.                 I have reported this to Imagen.
  1734.  
  1735.  
  1736. [20-Jan-87]
  1737.                 Replaced  page_xxx[]  arguments  to  sscanf()  in
  1738.                 option.h  with  int  temporaries  p1,p2,p3;   the
  1739.                 page_xxx[] values are  of type  INT16 which  does
  1740.                 not match  the  %d  format  items.   The  use  of
  1741.                 sscanf()  in  fontsub()  is  okay.   The  one  in
  1742.                 special() in dvialw.c has the type COORDINATE for
  1743.                 the variables llx,  lly, urx, ury;  the type  has
  1744.                 been changed to int.
  1745.  
  1746.                 This bug surfaced on an  HP Unix system with  the
  1747.                 FOCUS chip;  it is  disguised  on the  DEC-20  by
  1748.                 virtue of short, int, and long all being one word
  1749.                 long, and  on  the VAX  and  Intel  architectures
  1750.                 which address  these values  by their  low-order,
  1751.                 rather than high-order, byte (i.e. little  Endian
  1752.                 order).
  1753.  
  1754.  
  1755. [16-Jan-87]
  1756.                 Corrected error  in  tosprx.c which  resulted  in
  1757.                 loss of  first  page,  and added  test  to  avoid
  1758.                 unnecessary OR'ing zero bits into bitmap.
  1759.  
  1760.  
  1761. [10-Jan-86]
  1762.                 In machdefs.h, reset MAXOPEN to NFILES-6 or less,
  1763.                 where NFILES is the limit  on the number of  open
  1764.                 files  set   in  stdio.h.    It  was   previously
  1765.                 NFILES-5, which can cause an abort with a message
  1766.                 "unable to open error log file" because all  file
  1767.                 handles are in use.
  1768.  
  1769.  
  1770. [07-Jan-86]
  1771.                 Finished preliminary  release of  DVICAN for  the
  1772.                 Canon LBP-8 A2 laser  printer.  At present,  this
  1773.                 is  forced  to  send  bitmaps  for  every  single
  1774.                 typeset  character,  since  the  downloaded  font
  1775.                 mechanism  does  not   work  reliably.    Canon's
  1776.                 documentation is  abysmal, and  after tearing  my
  1777.                 hair out staring  at hex dumps  of the output  of
  1778.                 many test files, I received a hex dump of a  file
  1779.                 from a site  in Holland using  a driver  obtained
  1780.                 from Japan; to my surprise, they did not use  the
  1781.                 download mechanism,  just  bitmaps, so  I  expect
  1782.                 they hit the  same problems I  did.  I intend  to
  1783.                 try to find  out more  detailed information  from
  1784.                 the  local   Canon   dealer--perhaps   there   is
  1785.                 something magic missing.  It is indeed suspicious
  1786.                 however, when  TeX  input  "ABABABABAB"  produces
  1787.                 "ABA A A A ", and "A SHORT STORY" produces "A  SH
  1788.                 RT T Y"--characters  apparently randomly  (though
  1789.                 reproducibly) dropped from the printed page.
  1790.  
  1791.                 The penalty for sending bitmaps instead of  fonts
  1792.                 is severe--on a 15-page  test file, it took  10.8
  1793.                 times as  many  bytes/page as  DVIJEP,  averaging
  1794.                 nearly 95K characters/page,  for a throughput  of
  1795.                 one printed page every 2 to 4 minutes, instead of
  1796.                 the 4/minute available from the LaserJet Plus.
  1797.  
  1798.  
  1799. [20-Dec-86]
  1800.                 Updated DVIBIT,  fixing several  things that  had
  1801.                 been broken by changes which could not be  tested
  1802.                 earlier, and improving the interactive interface.
  1803.                 End-of-page action in prtpage.h has been expanded
  1804.                 and moved out to eopact.h.  Warning messages  are
  1805.                 suppressed for  DVIBIT when  quiet mode  (-q)  is
  1806.                 selected to avoid needlessly trashing the screen.
  1807.  
  1808.                 Default magnification for low-resolution  devices
  1809.                 changed from 579 (magstep -3 in 200dpi family) to
  1810.                 603 (magstep -5 in 300dpi family).
  1811.  
  1812.                 Added run-time  selectable virtual  font  support
  1813.                 for  performance   improvement,   particular   on
  1814.                 networked file  systems  where  the  overhead  of
  1815.                 reading small packets becomes unacceptably large.
  1816.                 With .PK fonts, most font files for normal  sized
  1817.                 text are 4K to 8K bytes, and for SliTeX text, 15K
  1818.                 to 20K bytes.   With up  to 15  fonts open,  this
  1819.                 probably requires less than 200K bytes of memory,
  1820.                 which is available for the non-bitmapped  drivers
  1821.                 even on my IBM PC.
  1822.  
  1823.  
  1824. [15-Dec-86]
  1825.                 Reorganized  machdefs.h  to  group  each  set  of
  1826.                 machine-specific changes  inside one  conditional
  1827.                 for  that  machine.   Removed  #undef's--if   the
  1828.                 compiler warns of  redefinitions, that is  useful
  1829.                 feedback that the right set has been chosen.
  1830.  
  1831.                 Completed  port  to  VAX  VMS.   VMS  C  has   an
  1832.                 incomplete library and faulty implementations  of
  1833.                 fseek(), ftell(),  and ungetc().   To get  around
  1834.                 these, macros FSEEK, FTELL, and UNGETC have  been
  1835.                 used throughout  the  code, and  machdefs.h  will
  1836.                 define them to point to special versions found in
  1837.                 vaxvms.c in  the OS_VAXVMS  conditional  section.
  1838.                 The VMS debugger, particular in screen mode where
  1839.                 the source  code,  output, and  debug  input  are
  1840.                 displayed in three  windows is excellent,  though
  1841.                 unnecessarily verbose.  VMS C makes memory page 0
  1842.                 inaccessible.   This  caught  two  instances   of
  1843.                 dereferencing of NULL pointers in movedown.h  and
  1844.                 moveover.h.
  1845.  
  1846.                 Logical names for VAX VMS are chosen to match the
  1847.                 Kellerman and Smith TeX implementation.  DVI  and
  1848.                 font file formats are assumed to be fixed binary;
  1849.                 stream files would be  better (since fseek()  and
  1850.                 ftell() work properly  for them,  and padding  to
  1851.                 block boundaries is  unnecessary), but their  use
  1852.                 would require rewriting change files for all  the
  1853.                 TeXware.
  1854.  
  1855.  
  1856. [05-Dec-86]
  1857.                 In dviinit.h  (TOPS-20  and VMS  only),  fix  bug
  1858.                 causing referencing of *(NULL + 1).  Change
  1859.                 "if (isdigit(*(tcp1+1)))"
  1860.                 to
  1861.                 "if ((tcp1 != (char*)NULL) && isdigit(*(tcp1+1)))"
  1862.  
  1863.  
  1864. [15-Nov-86]
  1865.                 In fontfile.h (bug  found Unix conditional  code,
  1866.                 but could happen if  other machines were  added),
  1867.                 in the loop beginning
  1868.  
  1869.                 m = 0;          /* index in filelist[] */
  1870.                 for (k = 0; k < MAXFORMATS; ++k) /* loop over possible file types */
  1871.                 {
  1872.                   *filelist[k] = '\0';  /* Initially, all filenames are empty */
  1873.  
  1874.                 the filelist[]  entry  is cleared  on  each  loop
  1875.                 iteration, but in  the Unix code  section, it  is
  1876.                 actually advancing over  two entries  at a  time.
  1877.                 The initialization  must  be  moved  out  into  a
  1878.                 separate new loop preceding the old one:
  1879.  
  1880.                 for (k = 0; k < MAXFORMATS; ++k)
  1881.                   *filelist[k] = '\0';  /* Initially, all filenames are empty */
  1882.  
  1883.  
  1884. [13-Nov-86]
  1885.                 Update makefile.1, makefile.2, makefile.msc for
  1886.                 IBM PC.
  1887.  
  1888.  
  1889. [13-Nov-86]
  1890.                 Add extra library .h file #include's in dvihead.h
  1891.                 for  IBM   PC   MICROSOFT  C   library   function
  1892.                 declarations.
  1893.  
  1894.  
  1895. [12-Nov-86]
  1896.                 Change malloc to MALLOC in getbmap.h, loadchar.h,
  1897.                 machdefs.h, and readfont.h; for IBM PC Microsoft,
  1898.                 this  is  defined  to  use  calloc()  instead  of
  1899.                 malloc() in machdefs.h.  This  seems to remove  a
  1900.                 long-standing  bug  of  the  driver  hanging  the
  1901.                 machine after printing the last page,  presumably
  1902.                 while in the free()  calls in dviterm().  I  made
  1903.                 extensive tests on the DEC-20 to try to reproduce
  1904.                 this bug,  by using  DDT to  introduce code  that
  1905.                 initializes the  free stack  area and  malloc()'d
  1906.                 memory  to  values  which  would  cause   integer
  1907.                 overflow if  used as  integers, and  would  cause
  1908.                 illegal memory  references if  used as  pointers.
  1909.                 No failure could be precipitated by this.  On the
  1910.                 IBM PC, the symptom was that the driver would run
  1911.                 on a freshly-booted machine (booting sets  memory
  1912.                 to a specific non-zero bit pattern), but if other
  1913.                 programs had been run,  it would sometimes  hang.
  1914.                 I  found   that   by  using   the   debugger   to
  1915.                 preinitialize  memory  to  a  fixed  bit  pattern
  1916.                 before running  DVIJEP,  I could  repeatedly  run
  1917.                 DVIJEP all night long.  The change from  malloc()
  1918.                 to calloc(),  which zeroes  the returned  memory,
  1919.                 permitted DVIJEP to run successfully 85 times  in
  1920.                 a row; when I subsequently reran the old version,
  1921.                 it hung  the  PC.   Recent  netmail  has  carried
  1922.                 numerous discussions  of irregularities  of  both
  1923.                 Lattice and Microsoft C  malloc()'s; this may  be
  1924.                 one more manifestation.
  1925.  
  1926. [31-Oct-86]
  1927.                 Fixed a dumb typo in dvialw.c and dvijep.c; in
  1928.                 setstr(), change
  1929.                 (void)fprintf(stderr,isprint(c) ? "%c" : "\\%03o",c);
  1930.                 to
  1931.                 (void)fprintf(stderr,isprint(str[k]) ? "%c" : "\\%03o",str[k]);
  1932.  
  1933.  
  1934. [24-Oct-86]
  1935.                 Whoops!  Somehow,  warning()  lost  its  code  to
  1936.                 write its message  on stderr as  well as the  log
  1937.                 file.  At the end, add the lines
  1938.  
  1939.                     NEWLINE(stderr);
  1940.  
  1941.                 #if    (OS_TOPS20 | OS_VAXVMS)
  1942.                     (void)putc('%',stderr);     /* percent at start of line */
  1943.                 #endif
  1944.  
  1945.                     (void)fputs(msg,stderr);
  1946.                     NEWLINE(stderr);
  1947.                     if (g_logname[0])
  1948.                     {
  1949.                         (void)fprintf(stderr,
  1950.                             "Current TeX page counters: [%s]",tctos());
  1951.                         NEWLINE(stderr);
  1952.                     }
  1953.  
  1954.                 The check of  g_logname[0] suppresses an  attempt
  1955.                 to supply page counters when no .DVI file has yet
  1956.                 been opened.
  1957.  
  1958.  
  1959. [24-Oct-86]
  1960.                 If an  invalid option  is detected  in  option(),
  1961.                 then warning()  and/or  fatal() will  be  called.
  1962.                 However, there is not  yet a file name  available
  1963.                 for a log file, and g_dolog is initially TRUE, so
  1964.                 both warning() and fatal() will abort because the
  1965.                 log  file  cannot  be  opened.   Change  the  "if
  1966.                 (g_dolog ...) statements in fatal.h and warning.h
  1967.                 to  include  the  condition  "&&   g_logname[0]".
  1968.                 Since  C  requires   external  variables  to   be
  1969.                 initialized to  zero,  g_logname[0] =  '\0'  when
  1970.                 option() is called, and  no attempt will be  made
  1971.                 to open the log file in warning() and fatal().
  1972.  
  1973.  
  1974. [21-Oct-86]
  1975.                 For  TOPS-20  only,  set  output  and  log   file
  1976.                 generation retention counts to zero, implying all
  1977.                 generations will be kept.  That way, if the  user
  1978.                 runs dvixxx for the same file, but with different
  1979.                 parameters (-x  and -y  are good  examples),  the
  1980.                 earlier versions  will not  be lost.   This  adds
  1981.                 some new flags to machdefs.h, and some additional
  1982.                 code to dviinit.h,  fatal.h, and warning.h  right
  1983.                 after their  fopen()  calls.   fopen(,"w+")  will
  1984.                 reuse an existing file, so we changed the logfile
  1985.                 generation to "-1", always giving a new file.
  1986.  
  1987.  
  1988. [21-Oct-86]
  1989.                 In prtpage.h, inserted
  1990.                     rule_height = -1;   /* reset last rule parameters */
  1991.                     rule_width = -1;
  1992.                 before line
  1993.                     str_ycp = -1;
  1994.                 in POSTSCRIPT section  (about line  115) of  case
  1995.                 BOP.  I caught this when I did `dvialw foo.dvi.*'
  1996.                 today-- after  the  first  file,  the  PostScript
  1997.                 output contained  a  reference  to  the  Q  macro
  1998.                 before a B had been issued to define h and w, the
  1999.                 previous bar dimensions.
  2000.  
  2001.  
  2002. [13-Oct-86]
  2003.                 Added  -d32  option  to  cause  display  of   all
  2004.                 truncated  off-page  text   strings.   This   was
  2005.                 prompted by my  wasting time looking  for what  I
  2006.                 thought was a bug in setstr() with long  strings.
  2007.                 Changes in  functions setstr()  and setchar()  in
  2008.                 dvialw.c and dvijep.c,  and setchar.h, as well as
  2009.                 documentation in dviman.ltx and dviman.texinfo.
  2010.  
  2011.  
  2012. [15-Sep-86]
  2013.                 Added -z option  for PostScript  and HP  LaserJet
  2014.                 Plus on  TOPS-20 only;  this types  in a  command
  2015.                 "DVISPOOL: dvifilename\n", permitting the user to
  2016.                 define a spooler for  the DVI file.  This  typein
  2017.                 is not automatic  as in TOPS-20  TeX, because  it
  2018.                 may interfere with batch and .mic files; however,
  2019.                 the final  newline  is supplied,  because  it  is
  2020.                 assumed the user wanted  it if the option  switch
  2021.                 was  given.   Changes  in  dviterm.h,  gblvars.h,
  2022.                 option.h, and  usage.h, with  new BOOLEAN  global
  2023.                 variable "spool_output".
  2024.  
  2025.  
  2026. [15-Sep-86]
  2027.                 Added page_step[]  to  allow  printing  pages  in
  2028.                 steps other 1, such  as for duplex printing,  and
  2029.                 option     -obeginpage:endpage:steppage;     this
  2030.                 required changes in dvifile.h, gblvars.h, main.h,
  2031.                 option.h, and usage.h.
  2032.  
  2033.  
  2034. [09-Sep-86]
  2035.                 Changed  checksum  error  message  in   readgf.h,
  2036.                 readpk.h, and  readpxl.h to  output checksums  in
  2037.                 octal and  hexadecimal as  well as  decimal,  and
  2038.                 explain  why  the  mismatch  is  likely  to  have
  2039.                 occurred.
  2040.  
  2041.                 Changed debug_code to debug_code & 4 in dvijep.c,
  2042.                 and updated dviman.ltx to define settings of  -d#
  2043.                 option for selective debug output.
  2044.  
  2045.                 Added DEBUG_OPEN() calls to dvialw.c,  dviinit.h,
  2046.                 fatal.h, fontsub.h,  openfont.h,  and  warning.h,
  2047.                 and definition of DEBUG_OPEN() to gendefs.h.
  2048.  
  2049.                 Delete doubled word in comment in charpk.h.
  2050.  
  2051.                 Insert typecast in fillrect.h:
  2052.                 *p = (UNSIGN32)ONES.
  2053.  
  2054.                 Insert typecast in dvibit.c:
  2055.                 tcharptr->istoobig = ((int)(tcharptr->hp*
  2056.                 ((tcharptr->wp+15) >> 4)) >= BIGBGCHAR);
  2057.  
  2058.                 Change  macro  argument  c  to  ch  in   dvijep.c
  2059.                 (Microsoft C  version 4.0  otherwise thinks  that
  2060.                 the c  in  the  format  specification  is  to  be
  2061.                 expanded too):
  2062.                 #define SETCHARCODE(fontnumber,ch) {\
  2063.                 if (fontnumber)\
  2064.                 (void)fprintf(plotfp,"\033*c%dd%dE",fontnumber,MAPCHAR(ch));\
  2065.                 else\
  2066.                 (void)fprintf(plotfp,"\033*cd%dE",MAPCHAR(ch));\
  2067.                 }
  2068.  
  2069.  
  2070. [04-Sep-86]
  2071.                 Fixed handling of -o-#  in option.h; I forgot  to
  2072.                 check for signs in skipping the number.
  2073.  
  2074.  
  2075. [28-Aug-86]
  2076.                 Wrote errshow.c; it is a filter which merges  the
  2077.                 error message file output  by Microsoft C with  a
  2078.                 copy  of  the  source  line  causing  the   error
  2079.                 message.
  2080.  
  2081.  
  2082. [28-Aug-86]
  2083.                 Minor changes for type matching.  Added typecasts
  2084.                 in chargf.h,  charpk.h, dvialw.c,  and  dvijep.c.
  2085.                 Changed  type  declarations  of  m_begin,  m_end,
  2086.                 m_step in dvitype.h, of  k in fontfile.h, and  of
  2087.                 fontfile() arguments in  gblprocs.h.  Added  code
  2088.                 for  IBM_PC_MICROSOFT  to  include  stdlib.h  and
  2089.                 string.h in main.h.  Version  3.0 of Microsoft  C
  2090.                 has a number of errors and inconsistencies in the
  2091.                 library file  type declarations  for stdio.h  and
  2092.                 string.h.   I  fixed  declarations  and  use   of
  2093.                 putc(), putchar(),  fileno(), _flsbuf(),  thereby
  2094.                 eliminating  "strong  type  mismatch"  errors  on
  2095.                 every  instance  of   use  of  these   functions.
  2096.                 Declarations of argument types for strxxx()  have
  2097.                 int instead of char, and unsigned int instead  of
  2098.                 int,   for    strchr(),   strlen(),    strrchr(),
  2099.                 strncpy(), strncat(), and strncmp(), which is  at
  2100.                 variance  with  Kernighan  &  Ritchie,  and  with
  2101.                 Harbison & Steele,  so use of  these still  gives
  2102.                 type  mismatch  errors.   I  am  not  fixing  the
  2103.                 library file  declarations  pending  seeing  what
  2104.                 Version 4.0 has  to offer,  and what  the ANSI  C
  2105.                 Standard committee does with them.
  2106.  
  2107.  
  2108. [21-Aug-86]
  2109.                 Add  -e   option   in   option.h   for   run-time
  2110.                 command-line   definition   of    ``environment''
  2111.                 variables, and  move initialization  of  xx_index
  2112.                 out  of  initglob()  into  dvifile().   This  was
  2113.                 prompted by the use of Unix server invocations of
  2114.                 the drivers  through  calls  to  ``system("dvixxx
  2115.                 filename")''.  Such a  call creates  a new  shell
  2116.                 which,  although   it   inherits   the   caller's
  2117.                 environment,  may  in   fact  require   different
  2118.                 environment variables, especially for things like
  2119.                 FONTLIST and TEXFONTS.
  2120.  
  2121.  
  2122. [21-Aug-86]
  2123.                 Change fontlist.h, gendefs.h,  and openfont.h  to
  2124.                 support a  more general  mechanism of  font  file
  2125.                 name generation.  fontlist()  now returns a  list
  2126.                 of pointers  to a  series of  possible font  file
  2127.                 names;  the  first  null   string  in  the   list
  2128.                 terminates  it.   The  Unix  and  VAX  VMS   code
  2129.                 sections in  fontlist.h now  generate names  with
  2130.                 the magnification both in  the directory name  as
  2131.                 well as in the extension.  This was prompted by a
  2132.                 local need  at  Utah  with  some  networked  Unix
  2133.                 workstations which have both flavors of font file
  2134.                 storage.
  2135.  
  2136.  
  2137. [21-Aug-86]
  2138.                 Change handling of TeX  \countn values to  INT32,
  2139.                 instead of UNSIGN32; roman-numeral pages come out
  2140.                 with negative  page numbers  in PLAIN.TEX.   This
  2141.                 affects the declaration and use of tex_counters[]
  2142.                 in dviinit.h, gblvars.h, prtpage.h, and  tctos.h.
  2143.  
  2144.  
  2145. [18-Aug-86]
  2146.                 Allow negative page  numbers on  -o#:# switch  to
  2147.                 mean pages  from end  (-1 =  last, -2  = next  to
  2148.                 last, etc.).  sscanf() format change in option(),
  2149.                 and introduce PAGENUMBER() macro in dvifile().
  2150.  
  2151.  
  2152. [15-Aug-86]
  2153.                 Conversion of the  font magnification factor  for
  2154.                 *.*pxl files in fontfile.h  to dots/inch for  the
  2155.                 *.*gf and *.*pk files forgot to round up.   Thus,
  2156.                 mag 1643  became  328 instead  of  329.   Because
  2157.                 fontfile() gets a truncated magnification  value,
  2158.                 the  rounding   is   non-trivial;   comments   in
  2159.                 fontfile() describe what is necessary.
  2160.  
  2161. ; Local Modes:
  2162. ; Mode:Text
  2163. ; Comment Column:0
  2164. ; Auto Fill Mode:1
  2165. ; Fill Column:65
  2166. ; Fill Prefix:"                "
  2167. ; Indent Tabs Mode:0
  2168. ; End:
  2169.